Skip to content

Commit c12a3d1

Browse files
authored
Merge pull request #137 from P01010000/patch-1
Fix slider not updating when changing value to 0
2 parents cb64401 + 7fa7e75 commit c12a3d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/react-chayns-slider/component/Slider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class Slider extends PureComponent {
109109
value,
110110
} = this.props;
111111

112-
if (value || (startValue && endValue)) {
112+
if (typeof value === 'number' || (startValue && endValue)) {
113113
if (interval) {
114114
this.leftPercent = ((startValue - min) / (max - min)) * 100;
115115
this.rightPercent = ((endValue - min) / (max - min)) * 100;

0 commit comments

Comments
 (0)