From 535a616ce11fd2d8233e25b8eebc7f2d2c985452 Mon Sep 17 00:00:00 2001 From: akhilmodi29 Date: Sun, 24 May 2026 15:12:02 +0530 Subject: [PATCH] fix: reset timePassed when timer duration is changed in study timer --- js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 787d08a..572cbfc 100644 --- a/js/app.js +++ b/js/app.js @@ -265,7 +265,8 @@ function resetTimer() { } timerDurationInput.addEventListener('change', () => { - if (!timerInterval && timePassed === 0) { + if (!timerInterval) { + timePassed = 0; TIME_LIMIT = getTimerDuration(); timeLeft = TIME_LIMIT; timerText.innerHTML = formatTimeLeft(timeLeft);