mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
670c80893b
commit
0000d2f011
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user