diff options
author | Luca Casonato <hello@lcas.dev> | 2024-08-02 16:23:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 16:23:21 +0200 |
commit | 7495bcbf77349d708b249944a149c16f5ee0c667 (patch) | |
tree | d6b1250478c1d3b5b4670bfb8e90debf841a4bbc /ext/node/polyfills/_http_outgoing.ts | |
parent | e24aa6bbeca265454fea3592fc9fc18e6312556e (diff) |
Revert "perf(ext/node): improve `Buffer` from string performance" (#24851)
Diffstat (limited to 'ext/node/polyfills/_http_outgoing.ts')
-rw-r--r-- | ext/node/polyfills/_http_outgoing.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_http_outgoing.ts b/ext/node/polyfills/_http_outgoing.ts index 41a1d844d..a6edc1144 100644 --- a/ext/node/polyfills/_http_outgoing.ts +++ b/ext/node/polyfills/_http_outgoing.ts @@ -542,7 +542,7 @@ export class OutgoingMessage extends Stream { if (data instanceof Buffer) { data = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); } - if (data.byteLength > 0) { + if (data.buffer.byteLength > 0) { this._bodyWriter.write(data).then(() => { callback?.(); this.emit("drain"); |