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) {
|
updateCurrentRoutine(currentRoutine) {
|
||||||
this.#currentRoutine = this.#routines[currentRoutine];
|
this.#currentRoutine = this.#routines[currentRoutine];
|
||||||
|
if (this.#currentRoutine) {
|
||||||
this.#currentRoutine.reset();
|
this.#currentRoutine.reset();
|
||||||
|
}
|
||||||
super.currentRoutine = currentRoutine;
|
super.currentRoutine = currentRoutine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user