Skip to content
Closed
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
Prev Previous commit
fixup
  • Loading branch information
ronag committed Jul 6, 2020
commit c2e7f03acb3a76d9a8ba0c90393143afebeacc31
6 changes: 1 addition & 5 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,7 @@ Readable.prototype.wrap = function(stream) {
// Proxy all the other methods. Important when wrapping filters and duplexes.
for (const i of ObjectKeys(stream)) {
if (this[i] === undefined && typeof stream[i] === 'function') {
this[i] = function methodWrap(method) {
return function methodWrapReturnFunction() {
return stream[method].apply(stream, arguments);
};
}(i);
this[i] = stream[i].bind(stream);
}
}

Expand Down