From be607b25a31e0b539852d9d494ad34bcf3dbdf2d Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 10 Feb 2021 07:57:27 -0600 Subject: [PATCH] refactor: index change cancels promise --- packages/behavior/src/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/behavior/src/actions.js b/packages/behavior/src/actions.js index a49a2a4..5596c3c 100644 --- a/packages/behavior/src/actions.js +++ b/packages/behavior/src/actions.js @@ -22,6 +22,8 @@ class Actions { } set index(index) { + // Clear out the action promise. + this.promise = null; this._index = index; } @@ -78,8 +80,6 @@ class Actions { } prologue() { - // Clear out the action promise. - this.promise = null; // Increment and wrap the index. this.index = (this.index + 1) % this.expressions.length; // If rolled over, the actions are finished.