Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Description
Reading through the Readable.from code is seems to me that the semantics of using Readable.from on a generator which yields null is not entirely clear.
Should we add a check for value == null and throw?
asyncfunctionnext(){try{const{ value, done }=awaititerator.next();if(done){readable.push(null);}elseif(readable.push(awaitvalue)){// Hm, push(null) and then next()?next();}else{reading=false;}}catch(err){readable.destroy(err);}}Might also want to be a bit more explicit in the docs about this?
Metadata
Metadata
Assignees
Labels
No labels