react-range
react-range copied to clipboard
Infinity loop with `step` equals zero
There is a case that leads to the infinity loop and page freezing: passing step: 0.
The this.numOfMarks becomes Infinity and the loop on line 61 will go forever.
https://github.com/tajo/react-range/blob/d7980b31e7eca8e184a212437a5f4d935dabd278/src/Range.tsx#L54-L63
What do you think about resetting step to the default value 1 in case of passed zero?
It's probably better to just throw an error so it's obvious for the developer.