You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
paper-slider crashes an attempt to create a new array with a negative number of entries.
This is because I am setting min and max (and step) via databinding from properties that have to be calculated and the order that the calculations happen, and therefore max and min get set cannot be guaranteed. I set min to 540, and max is still left at its default value of 100 (It should get set to 1020 very shortly afterwards)
_updateMarkers gets called because its an observer on (amongst other things) max and min. Because min is greater than max, the number of steps gets calculated as a negative number. THis negative number is used to create a new Array() and this throws the exception
Expected outcome
The slider doesn't fail
Actual outcome
There is an uncaught RangeError exception .
Live Demo
Steps to reproduce
Browsers Affected
Chrome
Firefox
Safari 9
Safari 8
Safari 7
Edge
IE 11
IE 10
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
paper-slider crashes an attempt to create a new array with a negative number of entries.
This is because I am setting
min
andmax
(andstep
) via databinding from properties that have to be calculated and the order that the calculations happen, and thereforemax
andmin
get set cannot be guaranteed. I set min to 540, and max is still left at its default value of 100 (It should get set to 1020 very shortly afterwards)_updateMarkers gets called because its an observer on (amongst other things)
max
andmin
. Becausemin
is greater thanmax
, the number ofsteps
gets calculated as a negative number. THis negative number is used to create anew Array()
and this throws the exceptionExpected outcome
The slider doesn't fail
Actual outcome
There is an uncaught RangeError exception .
Live Demo
Steps to reproduce
Browsers Affected
The text was updated successfully, but these errors were encountered: