mirror of https://github.com/ElemeFE/element
Slider: avoid NaN when min and max values are equal (#12256)
parent
fbe58a4015
commit
250e3f67ee
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue