Merge pull request #21 from cpvalente/fix/roll

Fix/roll
This commit is contained in:
Carlos Valente
2021-10-31 22:16:56 +01:00
committed by GitHub
4 changed files with 65 additions and 25 deletions
+4 -2
View File
@@ -12,6 +12,7 @@ export class Timer {
current = null;
timeTag = null;
secondaryTimer = null;
_secondaryTarget = null;
_finishAt = null;
_finishedAt = null;
_startedAt = null;
@@ -125,6 +126,7 @@ export class Timer {
this.current = this.duration;
this.running = null;
this.secondaryTimer = null;
this._secondaryTarget = null;
this._finishAt = null;
this._finishedAt = null;
this._startedAt = null;
@@ -139,9 +141,9 @@ export class Timer {
}
// getObject
getObject() {
getObject(update = true) {
// update timer
this.update();
if (update) this.update();
// update timetag
this.timeTag = stringFromMillis(this.current);