Skip to content

Commit bef795a

Browse files
authored
Update TwentyFourHoursMode.jsx
Change line 80: WAS: pointerRotate && this.setState({ pointerRotate }); BECAME: Number.isInteger(pointerRotate) && this.setState({ pointerRotate }); Description: In some situations pointerRotate is equal to 0. If value of pointerRotate is equal to 0, it returns false. So the function, which goes after &&, will not fire. http://take.ms/zDyAE - initial state; http://take.ms/Lajkm - after click on twelve or 0 hour; As you can see: hour is changed, but the arrow position is in previous state. My commit fixes this problem.
1 parent 6a4bdfd commit bef795a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/MaterialTheme/TwentyFourHoursMode.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TwentyFourHoursMode extends React.PureComponent {
7777
autoMode = null,
7878
pointerRotate = null,
7979
} = options;
80-
pointerRotate && this.setState({ pointerRotate });
80+
Number.isInteger(pointerRotate) && this.setState({ pointerRotate });
8181
this.handleTimeChange(time, autoMode);
8282
}
8383

0 commit comments

Comments
 (0)