Skip to content

Commit 406ef77

Browse files
committed
Fix alarm reset behavior: ensure alarm pauses and background flashing stops on reset
1 parent 2e8421b commit 406ef77

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Sprint-3/alarmclock/alarmclock.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function resetAlarm() {
3434
intervalId = null;
3535
updateDisplay(0);
3636
setFlashingBackground(false);
37+
pauseAlarm();
3738
}
3839

3940
function updateDisplay(seconds) {
@@ -77,6 +78,7 @@ function playAlarm() {
7778

7879
function pauseAlarm() {
7980
audio.pause();
81+
setFlashingBackground(false);
8082
}
8183

8284
window.onload = setup;

0 commit comments

Comments
 (0)