fix: return map value

This commit is contained in:
cha0s 2019-09-08 17:39:30 -05:00
parent 788fa6446a
commit 54f56763cc

View File

@ -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);
} }