stream: replace bind with arrow function for onwrite callback

PR-URL: https://github.com/nodejs/node/pull/62087
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
Ali Hassan authored and Antoine du Hamel committed 2026-03-28 18:14:04 +01:00
1 parent 670c80893b
commit 0000d2f011
1 file changed
+1 -1
+1 -1
View File
@@ -347,7 +347,7 @@ function WritableState(options, stream, isDuplex) {
this.corked = 0;
// The callback that's passed to _write(chunk, cb).
this.onwrite = onwrite.bind(undefined, stream);
this.onwrite = (er) => onwrite(stream, er);
// The amount that is being written when _write is called.
this.writelen = 0;