From cebf5e4b0843c5c342658d20c251dee90a9fdea7 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 14 Jun 2020 18:19:12 +0100 Subject: [PATCH] fixed a bug where results with tags that no longer exists wouldnt show up in the history --- public/js/account.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/js/account.js b/public/js/account.js index b32317ceb..afbe8c497 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -580,12 +580,17 @@ function refreshAccountPage() { } if(!activeFilters.includes(puncfilter)) return; + //check if the user has any tags defined if(dbSnapshot.tags.length > 0){ + //check if that result has any tags if(result.tags !== undefined && result.tags.length > 0){ let found = false; result.tags.forEach(tag => { + //check if any of the tags inside the result are active if(activeFilters.includes("tag_"+tag)) found = true; + //check if a tag doesnt exist and tag_notag is active + if(!dbSnapshot.tags.map(t => t.id).includes(tag) && activeFilters.includes("tag_notag")) found = true; }) if(!found) return; }else{