From 3ced99c84f295139a5c4a2f41cf6c2da3962b0b8 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 14 Jul 2020 21:42:48 +0100 Subject: [PATCH] fixed 'filter from current settings' button not activating 'no tag' button --- public/js/account.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/public/js/account.js b/public/js/account.js index fa6cbbee2..fe311cd6d 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -627,10 +627,15 @@ $(".pageAccount #currentConfigFilter").click((e) => { }); } catch (e) {} - activeTags.forEach((tag) => { - config.resultFilters.push(`tag_${tag}`); - toggleFilterButton(`tag_${tag}`); - }); + if (activeTags.length > 0) { + activeTags.forEach((tag) => { + config.resultFilters.push(`tag_${tag}`); + toggleFilterButton(`tag_${tag}`); + }); + } else { + config.resultFilters.push(`tag_notag`); + toggleFilterButton(`tag_notag`); + } saveConfigToCookie(); });