diff options
Diffstat (limited to 'pydis_site/static')
-rw-r--r-- | pydis_site/static/js/resources/resources.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pydis_site/static/js/resources/resources.js b/pydis_site/static/js/resources/resources.js index bbf07c94..b74c28ec 100644 --- a/pydis_site/static/js/resources/resources.js +++ b/pydis_site/static/js/resources/resources.js @@ -220,7 +220,6 @@ function updateUI() { } // Otherwise, hide everything and then filter the resources to decide what to show. - let hasMatches = false; resources.hide(); let filteredResources = resources.filter(function() { let validation = { @@ -249,7 +248,6 @@ function updateUI() { // If validation passes, show the resource. if (Object.values(validation).every(Boolean)) { - hasMatches = true; return true; } else { return false; @@ -265,7 +263,8 @@ function updateUI() { } // If there are no matches, show the no matches message - if (!hasMatches) { + let visibleResources = Boolean($(".resource-box:visible").length); + if (!visibleResources) { $(".no-resources-found").show(); } else { $(".no-resources-found").hide(); |