FIX: Sometimes `contents` is nil, don't break in that case.

This commit is contained in:
Robin Ward 2015-05-06 12:40:24 -04:00
parent 942f18143c
commit edae9d7ad9
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class TopicEmbed < ActiveRecord::Base
if SiteSetting.embed_truncate
contents = first_paragraph_from(contents)
end
contents ||= ''
contents << imported_from_html(url)
url = normalize_url(url)