fix: guard against null
This commit is contained in:
parent
59b902753e
commit
82cf2934ad
|
@ -184,7 +184,9 @@ export default (latus) => class Behaved extends decorate(Trait) {
|
|||
|
||||
updateCurrentRoutine(currentRoutine) {
|
||||
this.#currentRoutine = this.#routines[currentRoutine];
|
||||
this.#currentRoutine.reset();
|
||||
if (this.#currentRoutine) {
|
||||
this.#currentRoutine.reset();
|
||||
}
|
||||
super.currentRoutine = currentRoutine;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user