about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/account/field.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/account/field.rb b/app/models/account/field.rb
index e84a0eeb1..ffc8dce80 100644
--- a/app/models/account/field.rb
+++ b/app/models/account/field.rb
@@ -76,6 +76,7 @@ class Account::Field < ActiveModelSerializers::Model
   def extract_url_from_html
     doc = Nokogiri::HTML(value).at_xpath('//body')
 
+    return if doc.nil?
     return if doc.children.size > 1
 
     element = doc.children.first