Skip to content

Commit

Permalink
stream: remove unused function argument
Browse files Browse the repository at this point in the history
watchClosed() is only ever called with an anonymous function for the
action parameter. This anonymous funciton does not take any arguments.
Remove unused argument from invocation of action().

PR-URL: nodejs#41403
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and Linkgoron committed Jan 31, 2022
1 parent 28a7ef7 commit 72cc290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/webstreams/readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ function readableStreamPipeTo(

function watchClosed(stream, promise, action) {
if (stream[kState].state === 'closed')
action(stream[kState].storedError);
action();
else
PromisePrototypeThen(promise, action, () => {});
}
Expand Down

0 comments on commit 72cc290

Please sign in to comment.