diff --git a/modules/ClockFace.js b/modules/ClockFace.js index b1b007be9..bf64d418a 100644 --- a/modules/ClockFace.js +++ b/modules/ClockFace.js @@ -58,6 +58,7 @@ function ClockFace(options) { ClockFace.prototype.tick = function() { "ram" + if (this._removed) return; const time = new Date(); const now = { d: `${time.getFullYear()}-${time.getMonth()}-${time.getDate()}`, @@ -131,6 +132,7 @@ ClockFace.prototype.resume = function() { this.tick(); }; ClockFace.prototype.remove = function() { + this._removed = true; if (this._timeout) clearTimeout(this._timeout); Bangle.removeListener("lcdPower", this._onLcd); if (this._remove) this._remove.apply(this);