Skip to content

Commit

Permalink
Slider: avoid NaN when min and max values ​​are equal
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Aug 7, 2018
1 parent 8de71d0 commit 5925c13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slider/src/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
},
setPosition(newPosition) {
if (newPosition === null) return;
if (newPosition === null || isNaN(newPosition)) return;
if (newPosition < 0) {
newPosition = 0;
} else if (newPosition > 100) {
Expand Down

0 comments on commit 5925c13

Please sign in to comment.