Skip to content

Commit 8fbd05b

Browse files
JesuHrzTrott
authored andcommitted
stream: removes unnecessary params
Removes the state param in the onFinished function since it's never used within it. PR-URL: nodejs#32936 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
1 parent c61b388 commit 8fbd05b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/_stream_writable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
589589
if (err || state.finished)
590590
process.nextTick(cb, err);
591591
else
592-
onFinished(this, state, cb);
592+
onFinished(this, cb);
593593
}
594594

595595
return this;
@@ -677,7 +677,7 @@ function finish(stream, state) {
677677
}
678678

679679
// TODO(ronag): Avoid using events to implement internal logic.
680-
function onFinished(stream, state, cb) {
680+
function onFinished(stream, cb) {
681681
function onerror(err) {
682682
stream.removeListener('finish', onfinish);
683683
stream.removeListener('error', onerror);

0 commit comments

Comments
 (0)