diff --git a/package.json b/package.json index 7180fd8..5ea7221 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "dependencies": { "classnames": "^2.2.1", "rc-tooltip": "3.x", - "rc-util": "3.x" + "rc-util": "3.x", + "warning": "^2.1.0" } -} +} \ No newline at end of file diff --git a/src/Steps.jsx b/src/Steps.jsx index 5f33e7c..5b7a2b5 100644 --- a/src/Steps.jsx +++ b/src/Steps.jsx @@ -1,7 +1,9 @@ import React from 'react'; import classNames from 'classnames'; +import warning from 'warning'; function calcPoints(vertical, marks, dots, step, min, max) { + warning(dots ? step : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); const points = Object.keys(marks).map(parseFloat); if (dots) { for (let i = min; i <= max; i = i + step) {