Skip to content

Commit 289e747

Browse files
thisalihassanjuanarbol
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 cd6941d commit 289e747

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/internal/streams/writable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ function WritableState(options, stream, isDuplex) {
349349
this.corked = 0;
350350

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

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

0 commit comments

Comments
 (0)