Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ function onEofChunk(stream, state) {
}
state.ended = true;

if (state.sync && state.length) {
if (state.sync) {
// if we are sync and have data in the buffer, wait until next tick
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prob wanna remove the "and have data in the buffer" part of the comment now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// to emit the data. otherwise we risk emitting data in the flow()
// the readable code triggers during a read() call
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const BATCH = 10;
});

readable.on('end', common.mustCall(() => {
assert.strictEqual(nextTickPassed, false);
assert.strictEqual(nextTickPassed, true);
}));
}

Expand Down