Skip to content

Commit 87cdd72

Browse files
committed
useTimer restart minor fix
1 parent 4919d54 commit 87cdd72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/useTimer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function useTimer({ expiryTimestamp: expiry, onExpire, autoStart
3535
}
3636

3737
function restart(newExpiryTimestamp) {
38+
setDidStart(autoStart);
3839
setIsRunning(autoStart);
3940
setExpiryTimestamp(newExpiryTimestamp);
4041
setSeconds(Time.getSecondsFromExpiry(newExpiryTimestamp));

0 commit comments

Comments
 (0)