Skip to content

Commit

Permalink
rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Apr 27, 2020
1 parent 8bad1c4 commit a77341e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/streams/from.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ function from(Readable, iterable, opts) {
needToClose = false;
const { value, done } = await iterator.next();
needToClose = !done;
const resolved = await value;
if (done) {
readable.push(null);
} else if (readable.destroyed) {
await close();
} else {
const res = await value;
if (res == null) throw new ERR_STREAM_NULL_VALUES();
if (res === null) readable.destroy(new ERR_STREAM_NULL_VALUES());
if (readable.push(res)) {
next();
} else {
Expand Down

0 comments on commit a77341e

Please sign in to comment.