Skip link-back check if body is nil (#9107)

signup-info-prompt
abcang 2018-10-26 10:31:23 +09:00 committed by Eugen Rochko
parent 161aeadbb4
commit 1e2695198a
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class VerifyLinkService < BaseService
end end
def link_back_present? def link_back_present?
return false if @body.empty? return false if @body.blank?
links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]') links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]')