mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
fixed a bug where results with tags that no longer exists wouldnt show up in the history
This commit is contained in:
parent
484fe34816
commit
cebf5e4b08
1 changed files with 5 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue