From 55938d106aa004bab688db7f309559de0c14995c Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 16 Dec 2020 17:41:02 +0800 Subject: [PATCH] Fix bug. --- app/helpers/announcements_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index c1305b8..9d2edfc 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -199,6 +199,7 @@ module AnnouncementsHelper tags = page.tags tags = params[:tags] if params[:tags].present? categories = params['category']=='all' ? (page.categories || []) : ([Category.find(params['category'])] rescue (page.categories || [])) + categories = ["all"] if params[:tags].present? end if !params["source"].present? if @type == "show_widget"