diff --git a/utils/TimerMgr.js b/utils/TimerMgr.js index ee4f796..3194248 100644 --- a/utils/TimerMgr.js +++ b/utils/TimerMgr.js @@ -41,8 +41,12 @@ class TimerMgr { return this.#timers.hasOwnProperty(id); } - isActive(identifier) { - return this.#timers[identifier].isActive(); + isActive(id) { + if (!this.hasTimer(id)) { + log.warn(`No timer with id ${id} found`); + return false; + } + return this.#timers[id].isActive(); } cancelAll() {