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: #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 targos committed Jan 14, 2022
1 parent 02ca5d7 commit d79f8c2
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 d79f8c2

Please sign in to comment.