Skip to content

Commit

Permalink
whenResultIsFinished fix for array results (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
toshok authored and martijnwalraven committed Jun 27, 2018
1 parent 892ee31 commit 7155b77
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/graphql-extensions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ function whenResultIsFinished(result: any, callback: () => void) {
if (value && typeof value.then === 'function') {
promises.push(value);
}
if (promises.length > 0) {
Promise.all(promises).then(callback, callback);
} else {
callback();
}
});
if (promises.length > 0) {
Promise.all(promises).then(callback, callback);
} else {
callback();
}
} else {
callback();
}
Expand Down

0 comments on commit 7155b77

Please sign in to comment.