diff --git a/lib/internal/streams/writable.js b/lib/internal/streams/writable.js index a9beecee156ee6..e934c38bbf9acc 100644 --- a/lib/internal/streams/writable.js +++ b/lib/internal/streams/writable.js @@ -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;