Skip to content

Commit

Permalink
renamed function name 'checkForEmptyNotice' to 'toggleNoResultsNotice'
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmavis committed Sep 27, 2024
1 parent ed3c10a commit 8b81cd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/js/buyers-guide/search/pni-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class PNIToggle {

if (searchFilter.searchInput.value.trim()) {
searchFilter.searchInput.focus();
Utils.checkForEmptyNotice();
Utils.toggleNoResultsNotice();
}
}
}
4 changes: 2 additions & 2 deletions source/js/buyers-guide/search/search-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class SearchFilter {

Utils.sortFilteredProducts();
Utils.toggleCreepyFace();
Utils.checkForEmptyNotice();
Utils.toggleNoResultsNotice();
}

clearCategories() {
Expand All @@ -247,7 +247,7 @@ export class SearchFilter {
this.categoryTitle.value = category;
Utils.sortProductCards();
Utils.toggleCreepyFace();
Utils.checkForEmptyNotice();
Utils.toggleNoResultsNotice();
}

toggleSubcategory(clear = false) {
Expand Down
5 changes: 2 additions & 3 deletions source/js/buyers-guide/search/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,9 @@ export class Utils {

/**
* Toggle the visibility of "no results" notice
*
* @todo Rename to "toggleNoResultsNotice"
* based on the number of products displayed
*/
static checkForEmptyNotice() {
static toggleNoResultsNotice() {
let qs = `figure.product-box:not(.d-none)`;

if (document.body.classList.contains(`show-ding-only`)) {
Expand Down

0 comments on commit 8b81cd8

Please sign in to comment.