avoid error occured when channel title is only a String

This commit is contained in:
chiu committed 2020-06-03 20:05:07 +08:00
1 parent f78b05cad1
commit 2c16e3458f
1 file changed
+1 -1
+1 -1
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