Skip to content
Closed
Changes from all commits
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
stream: removes unnecessary params
Removes the state param in the onFinished function
since it's never used within it.
  • Loading branch information
JesuHrz committed Apr 20, 2020
commit 22fdc41488e69c603115e88c057e75a520f39582
4 changes: 2 additions & 2 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
if (err || state.finished)
process.nextTick(cb, err);
else
onFinished(this, state, cb);
onFinished(this, cb);
}

return this;
Expand Down Expand Up @@ -715,7 +715,7 @@ function onCorkedFinish(corkReq, state, err) {
}

// TODO(ronag): Avoid using events to implement internal logic.
function onFinished(stream, state, cb) {
function onFinished(stream, cb) {
function onerror(err) {
stream.removeListener('finish', onfinish);
stream.removeListener('error', onerror);
Expand Down