diff --git a/packages/behavior/item/actions.js b/packages/behavior/item/actions.js index c1e4c38..e523373 100644 --- a/packages/behavior/item/actions.js +++ b/packages/behavior/item/actions.js @@ -36,12 +36,13 @@ export class Actions extends decorate(Traversals) { this.emitFinished(); return; } - if ( - this.pending - && this.pending instanceof TickingPromise - && 'function' === typeof this.pending.ticker - ) { - this.pending.ticker(elapsed); + if (this.pending) { + if ( + this.pending instanceof TickingPromise + && 'function' === typeof this.pending.ticker + ) { + this.pending.ticker(elapsed); + } return; } @@ -50,9 +51,12 @@ export class Actions extends decorate(Traversals) { while (true) { const result = this.traversals[this.index].traverse(context); if (result instanceof Promise) { - result.then(() => this.prologue()); + result.then(() => { + this.prologue(); + }); result.catch((error) => { - throw error; + console.error(error); + this.prologue(); }); this.pending = result; break;