Fix bug.
This commit is contained in:
parent
fcf98fef36
commit
96f0dffcd3
|
@ -171,7 +171,7 @@ module AnnouncementsHelper
|
|||
else
|
||||
tags = page.tags
|
||||
tags = params[:tags] if params[:tags].present?
|
||||
categories = params['category']=='all' ? (page.categories || []) : (Array(params['category']) rescue (page.categories || []))
|
||||
categories = params['category']=='all' ? (page.categories || []) : (params['category'].nil? ? (page.categories || []) : Array(params['category']))
|
||||
if params['category'].present? && tags.blank?
|
||||
tags = ["all"]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue