Skip to content

Commit

Permalink
stream: removes unnecessary params
Browse files Browse the repository at this point in the history
Removes the state param in the onFinished function
since it's never used within it.
  • Loading branch information
JesuHrz committed Apr 20, 2020
1 parent 5c34788 commit 22fdc41
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 22fdc41

Please sign in to comment.