Add guard clause for presence of processed_html (#5638) [deploy]

This commit is contained in:
Ben Halpern 2020-01-22 15:32:50 -05:00 committed by GitHub
parent d82bbb874e
commit 52ada1450c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,8 @@ module ArticlesHelper
end
def has_vid?(article)
return if article.processed_html.blank?
article.processed_html.include?("youtube.com/embed/") || article.processed_html.include?("player.vimeo.com") || article.comments_blob.include?("youtube")
end