tc39 / proposal-array-from-async

Draft specification for a proposed Array.fromAsync method in JavaScript.
http://tc39.es/proposal-array-from-async/
BSD 3-Clause "New" or "Revised" License
177 stars 13 forks source link

fix: Replace IteratorStep with NextMethod #44

Closed js-choi closed 9 months ago

js-choi commented 9 months ago

Fixes #33. Prevents an infinite loop caused by IteratorStep(iteratorRecord) not actually flagging termination when IteratorRecord is async. Instead, we will directly call iteratorStep.[[NextMethod]], like how for await does. Uses the patch suggested by @bakkot.