Skip to content

Commit 22fdc41

Browse files
committed
stream: removes unnecessary params
Removes the state param in the onFinished function since it's never used within it.
1 parent 5c34788 commit 22fdc41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/_stream_writable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
619619
if (err || state.finished)
620620
process.nextTick(cb, err);
621621
else
622-
onFinished(this, state, cb);
622+
onFinished(this, cb);
623623
}
624624

625625
return this;
@@ -715,7 +715,7 @@ function onCorkedFinish(corkReq, state, err) {
715715
}
716716

717717
// TODO(ronag): Avoid using events to implement internal logic.
718-
function onFinished(stream, state, cb) {
718+
function onFinished(stream, cb) {
719719
function onerror(err) {
720720
stream.removeListener('finish', onfinish);
721721
stream.removeListener('error', onerror);

0 commit comments

Comments
 (0)