refactor: index change cancels promise
This commit is contained in:
parent
f2e8366934
commit
be607b25a3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user