From a4ef044f7f931b4ac0cd73a61e0d446dcb22849c Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 11 May 2021 10:01:26 +0800 Subject: [PATCH] Fix bug. --- app/controllers/announcements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index deba329..d749cd9 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -71,7 +71,7 @@ class AnnouncementsController < ApplicationController if (params['category'] != page.categories rescue true) @annc_page_title = Category.find(Array(params['category']).first).title rescue nil end - if (params["tags"] != page.tags && params["tags"].count == 1 rescue true) + if (params["tags"] != page.tags && !params["tags"].blank? && params["tags"].count == 1 rescue true) @annc_page_title = Tag.find(Array(params['tags']).first).name rescue nil end {