Skip to content

Commit

Permalink
Fix: Add minutes via button when countdown is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
minthemiddle committed Apr 1, 2024
1 parent b01625e commit 4f559f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@
},

addMinutes(minutes) {
this.remainingSeconds += minutes * 60;
if (!this.isRunning) {
this.durationMinutes += minutes;
this.remainingSeconds = this.durationMinutes * 60;
this.updateSliderValue();
} else {
this.remainingSeconds += minutes * 60;
}
},

stopTimer() {
Expand Down

0 comments on commit 4f559f0

Please sign in to comment.