mirror of
https://github.com/wassname/slider.git
synced 2026-09-09 11:35:22 +08:00
fix: if there is no marks, step=1 should work
This commit is contained in:
+1
-1
@@ -235,7 +235,7 @@ class Slider extends React.Component {
|
||||
getPoints() {
|
||||
const {marks, step, min, max} = this.props;
|
||||
const points = new Set(Object.keys(marks));
|
||||
if (step > 1) {
|
||||
if (isEmpty(marks) || step > 1) {
|
||||
for (let i = min; i <= max; i = i + step) {
|
||||
points.add(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user