check fragment is the right form before using it as filters
This commit is contained in:
parent
47fff05d48
commit
e47b790242
1 changed files with 5 additions and 2 deletions
|
@ -100,8 +100,11 @@ function useFragment() {
|
|||
clearForm();
|
||||
} else {
|
||||
let set = new Set(frag.split(';'));
|
||||
allBoxes.forEach(b => b.checked = set.has(b.id));
|
||||
document.getElementById('filters-details').open = true;
|
||||
if (new Array(...set).every(x => /^(require|exclude)_/.test(x))) {
|
||||
allBoxes.forEach(b => b.checked = set.has(b.id));
|
||||
let details = document.getElementById('filters-details');
|
||||
details.open = !set.has('hide_filters');
|
||||
}
|
||||
}
|
||||
|
||||
updateItems();
|
||||
|
|
Loading…
Reference in a new issue