fix(timer): handle missing timer in isActive method
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user