FIX: RSS description might be `nil`.

This commit is contained in:
Guo Xiang Tan 2016-03-07 17:27:27 +08:00
parent eb5cee3150
commit bc4087b9bb
1 changed files with 1 additions and 5 deletions

View File

@ -86,11 +86,7 @@ module Jobs
end
def content
if @article_rss_item.content
@article_rss_item.content.scrub
else
@article_rss_item.description.scrub
end
@article_rss_item.content.try(:scrub) || @article_rss_item.description.try(:scrub)
end
def title