Skip to content

Commit 8612f4a

Browse files
committed
fixup! stream: consolidate common code from readable push and unshift helper functions
1 parent 337ba20 commit 8612f4a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/internal/streams/readable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ Readable.prototype.read = function(n) {
738738

739739
function onEofChunk(stream, state) {
740740
debug('onEofChunk');
741+
if ((state[kState] & kEnded) !== 0) return;
741742
const decoder = (state[kState] & kDecoder) !== 0 ? state[kDecoderValue] : null;
742743
if (decoder) {
743744
const chunk = decoder.end();

0 commit comments

Comments
 (0)