Skip to content

Commit f70ec66

Browse files
committed
fix
1 parent 00bb76a commit f70ec66

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/execution/execute.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,16 +1783,6 @@ export class Dispatcher {
17831783

17841784
resolved = true;
17851785

1786-
if (this._isDone) {
1787-
resolve({
1788-
value: {
1789-
hasNext: false,
1790-
},
1791-
done: false,
1792-
});
1793-
return;
1794-
}
1795-
17961786
if (this._subsequentPayloads.length === 0) {
17971787
// a different call to next has exhausted all payloads
17981788
resolve({ value: undefined, done: true });
@@ -1820,6 +1810,11 @@ export class Dispatcher {
18201810
done: false
18211811
});
18221812
return;
1813+
} else if (done) {
1814+
// async iterable resolver just finished but there are pending payloads
1815+
// return the next one
1816+
resolve(this._race());
1817+
return
18231818
}
18241819

18251820
const returnValue: ExecutionPatchResult = {

0 commit comments

Comments
 (0)