fix: return map value
This commit is contained in:
parent
788fa6446a
commit
54f56763cc
|
@ -73,10 +73,11 @@ export class Actions extends decorate(Traversals) {
|
||||||
let immediate = true;
|
let immediate = true;
|
||||||
const results = this.traversals.map((traversal) => {
|
const results = this.traversals.map((traversal) => {
|
||||||
const result = traversal.traverse(context);
|
const result = traversal.traverse(context);
|
||||||
|
// Side-effect for performance.
|
||||||
if (result instanceof Promise) {
|
if (result instanceof Promise) {
|
||||||
immediate = false;
|
immediate = false;
|
||||||
}
|
}
|
||||||
results.push(result);
|
return result;
|
||||||
});
|
});
|
||||||
return immediate ? results : TickingPromise.all(results);
|
return immediate ? results : TickingPromise.all(results);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user