Skip to content

Commit 61111e7

Browse files
committed
handle string input
1 parent 2cd628f commit 61111e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function setAlarm() {
2727
const input = document.getElementById("alarmSet");
2828
if (input.value === "") return;
2929
remainingSeconds = Number(input.value);
30+
if (!Number.isFinite(remainingSeconds)) return;
3031
clearInterval(timerId);
3132
timerId = null;
3233

0 commit comments

Comments
 (0)