refactor: index change cancels promise

This commit is contained in:
cha0s 2021-02-10 07:57:27 -06:00
parent f2e8366934
commit be607b25a3

View File

@ -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.