Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Mar 19, 2021
1 parent 00bb76a commit f70ec66
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -1783,16 +1783,6 @@ export class Dispatcher {

resolved = true;

if (this._isDone) {
resolve({
value: {
hasNext: false,
},
done: false,
});
return;
}

if (this._subsequentPayloads.length === 0) {
// a different call to next has exhausted all payloads
resolve({ value: undefined, done: true });
Expand Down Expand Up @@ -1820,6 +1810,11 @@ export class Dispatcher {
done: false
});
return;
} else if (done) {
// async iterable resolver just finished but there are pending payloads
// return the next one
resolve(this._race());
return
}

const returnValue: ExecutionPatchResult = {
Expand Down

0 comments on commit f70ec66

Please sign in to comment.