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 addaleax committed Apr 25, 2020
1 parent c61b388 commit 24a4e61
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 @@ -589,7 +589,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 @@ -677,7 +677,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 24a4e61

Please sign in to comment.