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.

PR-URL: #32936
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
  • Loading branch information
JesuHrz authored and BethGriggs committed Apr 27, 2020
1 parent ed1526c commit 0702152
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 @@ -582,7 +582,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 @@ -664,7 +664,7 @@ function finish(stream, state) {
}

// 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 0702152

Please sign in to comment.