Skip to content

Commit a8adf43

Browse files
committed
use correct secondsValue const in calculateExpiryDate for useTimer
1 parent bf95d21 commit a8adf43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useTimer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default function useTimer(settings) {
9999
const hoursValue = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
100100
const minutesValue = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
101101
const secondsValue = Math.floor((distance % (1000 * 60)) / 1000);
102-
if (seconds < 0) {
102+
if (secondsValue < 0) {
103103
reset();
104104
isValidOnExpire(onExpire) && onExpire();
105105
} else {

0 commit comments

Comments
 (0)