Update ongoing promise in async iterator return()
method
#51725
Labels
confirmed-bug
Issues with confirmed bugs.
return()
method
#51725
There's an edge case with the current Web IDL bindings for async iterators where manually calling
return(); next()
could result in thenext()
promise resolving before thereturn()
promise. The latest version of the Web IDL specification fixes this by updating the "ongoing promise" in the async iteratorreturn()
method.For Node.js, this affects
ReadableStream.prototype[Symbol.asyncIterator]
. More specifically, this part needs to be changed:node/lib/internal/webstreams/readablestream.js
Lines 547 to 554 in a8de25e
ReadableStream[@@asyncIterator]
)The text was updated successfully, but these errors were encountered: