Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix: prevent timer from accelerating on multiple start clicks
  • Loading branch information
disha2553 committed Aug 5, 2025
commit 85618680e1e39daab22954fdf05a8f5d021a1000
2 changes: 1 addition & 1 deletion projects/pomodoro-timer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function startTimer() {
updateTimer();
if (timeLeft === 0) {
clearInterval(interval);
interval = null;
alert("Time's up!");
timeLeft = 1500;
interval = null;
updateTimer();
}
}, 1000);
Expand Down