Skip to content

Commit 1e62517

Browse files
committed
Hide no filters selected in all cases.
1 parent 91935d8 commit 1e62517

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pydis_site/static/js/resources/resources.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function deserializeURLParams() {
6969
let paramFilterArray = paramFilterContent.split(",");
7070

7171
// Update the corresponding filter UI, so it reflects the internal state.
72+
let filterAdded = false;
7273
$(paramFilterArray).each(function(_, filter) {
7374
// Make sure the filter is valid before we do anything.
7475
if (String(filter) === "rickroll" && filterType === "type") {
@@ -83,11 +84,17 @@ function deserializeURLParams() {
8384
filterTag.show();
8485
resourceTags.addClass("active");
8586
activeFilters[filterType].push(filter);
87+
filterAdded = true;
8688
}
8789
});
8890

8991
// Ditch all the params from the URL, and recalculate the URL params
9092
updateURL();
93+
94+
// If we've added a filter, hide the no filters tag.
95+
if (filterAdded) {
96+
$(".no-tags-selected.tag").hide();
97+
}
9198
}
9299
});
93100
}

0 commit comments

Comments
 (0)