diff options
author | Jesus Hernandez <jesusbeckan@gmail.com> | 2020-04-19 21:01:39 -0500 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-04-25 02:37:26 +0200 |
commit | 24a4e6153dae01cc7d5b28a21a105d680e9a5037 (patch) | |
tree | a591e050f2fd11ab06fa0de53df9353de52269c1 /lib/_stream_writable.js | |
parent | c61b388c29dc73ef3c94aef0f790e012683d24ef (diff) | |
download | node-new-24a4e6153dae01cc7d5b28a21a105d680e9a5037.tar.gz |
stream: removes unnecessary params
Removes the state param in the onFinished function
since it's never used within it.
PR-URL: https://github.com/nodejs/node/pull/32936
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'lib/_stream_writable.js')
-rw-r--r-- | lib/_stream_writable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 100a9c8bdf..ed3eac4132 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -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; @@ -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); |