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 danielleadams committed Feb 1, 2022
1 parent af6f1d5 commit 5d27f4a
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 5d27f4a

Please sign in to comment.