twhoffma / grog-ui-snappy

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Filters fails to initialize when it is empty #2

Open twhoffma opened 3 years ago

twhoffma commented 3 years ago

Max or min is null. In that case, either do not initialize or initialise with very lage values and disable.

https://glaze.hoffy.no/?id=47 with

Uncaught (in promise) Error: noUiSlider: 'range' 'min' and 'max' cannot be equal. at Object.z [as t] (nouislider.min.js:3) at nouislider.min.js:3 at Array.forEach () at O (nouislider.min.js:3) at Object.Q [as create] (nouislider.min.js:3) at ui.js:372 at Array.forEach () at Object.populateFilters (ui.js:344) at app.js:214

twhoffma commented 3 years ago

It is the same if max and min are the same. Same list, just now with two boardgames which are both published in 2021. Default values can be 1000 if the same or year 1000 - 4712 if blank.