Skip to content

Commit ae30b39

Browse files
Trottdanielleadams
authored andcommitted
stream: fix error-path function call
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: #41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 2586f09 commit ae30b39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/streams/writable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ function callFinal(stream, state) {
710710
}
711711
}
712712
} catch (err) {
713-
onFinish(stream, state, err);
713+
onFinish(err);
714714
}
715715

716716
state.sync = false;

0 commit comments

Comments
 (0)