Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle errors in flatmap #64

Open
wants to merge 2 commits into
base: master
from

Conversation

@bakkot
Copy link
Contributor

bakkot commented Nov 7, 2019

When one of the to-be-flattened iterators errors, the receiver iterator should still be closed gracefully.

In the second commit I also switched the first *false* to a *true* in If _innerComplete_ is *false*, set _innerAlive_ to *false*. in Iterator.prototype.flatMap, which makes it match AsyncIterator.prototype.flatMap. I am pretty sure that makes it match the intent, but haven't checked carefully. Presumably one of the two is wrong prior to this PR, though.

@ljharb
ljharb approved these changes Nov 7, 2019
spec.html Outdated Show resolved Hide resolved
@bakkot bakkot force-pushed the bakkot:flatmap-errors branch from a9991c6 to 99425cf Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.