From d79f8c298758c59a37998e798cda72cf50a53eaa Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 7 Jan 2022 08:49:16 -0800 Subject: [PATCH] stream: remove unused function argument 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: https://github.com/nodejs/node/pull/41403 Reviewed-By: Yongsheng Zhang Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca --- lib/internal/webstreams/readablestream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index 79643c0e1e902f..e661fc23894024 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -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, () => {}); }