diff options
Diffstat (limited to 'src/bun.js/streams.exports.js')
-rw-r--r-- | src/bun.js/streams.exports.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bun.js/streams.exports.js b/src/bun.js/streams.exports.js index 988666388..5df244950 100644 --- a/src/bun.js/streams.exports.js +++ b/src/bun.js/streams.exports.js @@ -2949,7 +2949,9 @@ var require_readable = __commonJS({ } else if (chunk instanceof Buffer) { encoding = ""; } else if (Stream._isUint8Array(chunk)) { - chunk = Stream._uint8ArrayToBuffer(chunk); + if (addToFront || !state.decoder) { + chunk = Stream._uint8ArrayToBuffer(chunk); + } encoding = ""; } else if (chunk != null) { err = new ERR_INVALID_ARG_TYPE( |