Fix clear existing brand filter when selecting a category (#38307)

This commit is contained in:
c0ffeeca7 2025-04-01 09:52:17 +02:00 committed by GitHub
commit e67a237406
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -728,6 +728,10 @@ join: ',' | split: ',' -%}
let value = select.value;
if (value !== '#') {
// Clear any existing brand filter when selecting a category
if (id === 'cat') {
removeQueryFromURL('brands');
}
setQueryURL(id, value);
} else {
// clear current filter