avoid error occured when channel title is only a String

This commit is contained in:
chiu 2020-06-03 20:05:07 +08:00
parent f78b05cad1
commit 2c16e3458f
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class SiteFeedAnnc
end.compact
end
def channel_title(locale=I18n.locale)
self[:channel_title][locale]
self[:channel_title][locale] rescue self[:channel_title]
end
def category
Category.find(self.merge_with_category) rescue nil