feat: Actions::tickingPromise
This commit is contained in:
parent
708c4fe25d
commit
3296f3d196
|
@ -113,10 +113,15 @@ export class Actions extends decorate(Traversals) {
|
|||
}
|
||||
|
||||
serial(context) {
|
||||
// Do a "dry" tick.
|
||||
// Immediate tick. Maybe we can avoid a promise?
|
||||
this.tick(context, 0);
|
||||
// If it's pending, we have to return a ticking promise.
|
||||
if (this.pending) {
|
||||
return this.tickingPromise(context);
|
||||
}
|
||||
}
|
||||
|
||||
tickingPromise(context) {
|
||||
return new TickingPromise(
|
||||
(resolve) => {
|
||||
this.once('actionsFinished', () => {
|
||||
|
@ -128,6 +133,5 @@ export class Actions extends decorate(Traversals) {
|
|||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user