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();
|
clearForm();
|
||||||
} else {
|
} else {
|
||||||
let set = new Set(frag.split(';'));
|
let set = new Set(frag.split(';'));
|
||||||
|
if (new Array(...set).every(x => /^(require|exclude)_/.test(x))) {
|
||||||
allBoxes.forEach(b => b.checked = set.has(b.id));
|
allBoxes.forEach(b => b.checked = set.has(b.id));
|
||||||
document.getElementById('filters-details').open = true;
|
let details = document.getElementById('filters-details');
|
||||||
|
details.open = !set.has('hide_filters');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateItems();
|
updateItems();
|
||||||
|
|
Loading…
Reference in a new issue