Skip to content

Commit

Permalink
handle no timer better
Browse files Browse the repository at this point in the history
  • Loading branch information
andorsk committed May 8, 2024
1 parent 6e5ac81 commit 248b538
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/workout/WorkoutManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,13 @@ export class WorkoutManager implements WorkoutManagerI {
),
);

this._timeLeft =
this._timeFromBeginningOfSet -
(this._timer.totalTime - this._timer.remainingTime);
if (this._timer?.totalTime) {
this._timeLeft =
this._timeFromBeginningOfSet -
(this._timer.totalTime - this._timer.remainingTime);
} else {
this._timeLeft = this.timeFromBeginningOfSet;
}

// this._timeLeft = this._timeFromBeginningOfSet;
this._playedThreeSecondSound = false;
Expand Down

0 comments on commit 248b538

Please sign in to comment.