Skip to content

Commit

Permalink
[FMS] Prevent category select error message showing before cats loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
MorayMySoc authored and dracos committed Jul 24, 2024
1 parent 40c8105 commit 437132e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/cobrands/fixmystreet/fixmystreet.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ $.extend(fixmystreet.set_up, {

function disable_on_empty() {
// If there are no items found, give a message and disable the Continue button
if (items.length === document.querySelectorAll(".hidden-category-filter").length) {
if (items.length && items.length === document.querySelectorAll(".hidden-category-filter").length) {
$('#js-top-message').html('<p class="form-error" id="filter-category-error">Please try another search or delete your search and choose from the categories</p>');
$('.js-reporting-page--next').prop("disabled",true);
category_row.style.paddingBottom = null;
Expand Down

0 comments on commit 437132e

Please sign in to comment.