diff --git a/package.json b/package.json index 4da117f..679e274 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-slider", - "version": "5.1.0", + "version": "5.1.1", "description": "slider ui component for react", "keywords": [ "react", diff --git a/src/Slider.jsx b/src/Slider.jsx index bf31f18..f5d4fd7 100644 --- a/src/Slider.jsx +++ b/src/Slider.jsx @@ -45,7 +45,9 @@ class Slider extends React.Component { recent = bounds.length - 1; } - if (process.env.NODE_ENV !== 'production' && (max - min) % step !== 0) { + if (process.env.NODE_ENV !== 'production' && + step && Math.floor(step) === step && + (max - min) % step !== 0) { warning( false, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)',