From 22fdc41488e69c603115e88c057e75a520f39582 Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Sun, 19 Apr 2020 21:01:39 -0500 Subject: [PATCH] stream: removes unnecessary params Removes the state param in the onFinished function since it's never used within it. --- lib/_stream_writable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index eb88a36185a6ff..7f2703e18d4620 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -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; @@ -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);