Skip to content

Commit

Permalink
Slider: avoid NaN when min and max values ​​are equal (#12256)
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai authored and ziyoung committed Aug 7, 2018
1 parent fbe58a4 commit 250e3f6
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 250e3f6

Please sign in to comment.