mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 03:13:47 +00:00
refactor: small type improvements (#759)
This commit is contained in:
@@ -38,7 +38,8 @@ export class SimpleTimer {
|
||||
|
||||
public start(timeNow: number): SimpleTimerState {
|
||||
if (this.state.playback === SimplePlayback.Pause) {
|
||||
const elapsedSincePause = this.pausedAt - this.startedAt;
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- we know these are not null in a timer that is paused
|
||||
const elapsedSincePause = this.pausedAt! - this.startedAt!;
|
||||
this.startedAt = timeNow - elapsedSincePause;
|
||||
} else if (this.state.playback === SimplePlayback.Stop) {
|
||||
this.startedAt = timeNow;
|
||||
|
||||
Reference in New Issue
Block a user