Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0000d2f

Browse filesBrowse 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
Copy full SHA for 0000d2f

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/streams/writable.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/writable.js
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.