Fix card-multiselect js errors on page load when no card multiselect is on page

This commit is contained in:
badblocks 2025-04-17 18:39:48 -07:00
parent 4bb81de1e4
commit 1c702e9e31

View file

@ -162,6 +162,10 @@ document.addEventListener('DOMContentLoaded', function() {
} }
}); });
if (choicesInstance.getValue(true).length > 0 && window.updateGlobalCardFilters) {
window.updateGlobalCardFilters();
}
// Listen for increment/decrement clicks (scoped to the choices container). // Listen for increment/decrement clicks (scoped to the choices container).
const choicesContainer = selectField.closest('.choices') || document; const choicesContainer = selectField.closest('.choices') || document;
@ -212,8 +216,4 @@ document.addEventListener('DOMContentLoaded', function() {
} }
}); });
}); });
if (choicesInstance.getValue(true).length > 0 && window.updateGlobalCardFilters) {
window.updateGlobalCardFilters();
}
}); });