Skip to content

Commit

Permalink
Fixed the "adding extra minutes when press resume"
Browse files Browse the repository at this point in the history
 Please enter the commit message for your changes. Lines starting
  • Loading branch information
Palm1ye committed May 2, 2024
1 parent 269868c commit 97fd522
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ pauseButton.addEventListener('click', function () {
});

resumeButton.addEventListener('click', function () {
let currentTimer = timerDisplay.textContent.split(':');
let minutes = parseInt(currentTimer[0]);
let seconds = parseInt(currentTimer[1]);
remainingTime = minutes * 60 + seconds;
startTimer(minutes);
startTimer(0);
pauseButton.disabled = false;
resumeButton.disabled = true;
});
Expand Down

0 comments on commit 97fd522

Please sign in to comment.