Skip to content

Commit 0000d2f

Browse files
thisalihassanaduh95
authored andcommitted
stream: replace bind with arrow function for onwrite callback
PR-URL: #62087 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 670c808 commit 0000d2f

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
@@ -347,7 +347,7 @@ function WritableState(options, stream, isDuplex) {
347347
this.corked = 0;
348348

349349
// The callback that's passed to _write(chunk, cb).
350-
this.onwrite = onwrite.bind(undefined, stream);
350+
this.onwrite = (er) => onwrite(stream, er);
351351

352352
// The amount that is being written when _write is called.
353353
this.writelen = 0;

0 commit comments

Comments
 (0)