diff options
author | 2022-12-03 23:56:40 -0800 | |
---|---|---|
committer | 2022-12-03 23:56:40 -0800 | |
commit | de9a2b9fe54cb7fd9696a3fa8edfa9c42829280d (patch) | |
tree | 2ee6fdcdb939f5a6c144ecaf72e28ceb4bd40d64 | |
parent | 201cbb20e41a0997e56a0cf2fca4096d7392c14a (diff) | |
download | bun-de9a2b9fe54cb7fd9696a3fa8edfa9c42829280d.tar.gz bun-de9a2b9fe54cb7fd9696a3fa8edfa9c42829280d.tar.zst bun-de9a2b9fe54cb7fd9696a3fa8edfa9c42829280d.zip |
[fetch] Fix bug where .arrayBuffer() on an empty Response body returned a `Uint8Array` instead of an `ArrayBuffer`
-rw-r--r-- | src/bun.js/webcore/response.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/webcore/response.zig b/src/bun.js/webcore/response.zig index e3a1bbdfd..d6332b993 100644 --- a/src/bun.js/webcore/response.zig +++ b/src/bun.js/webcore/response.zig @@ -4067,7 +4067,7 @@ pub const AnyBlob = union(enum) { // }, .InternalBlob => { if (this.InternalBlob.bytes.items.len == 0) { - return JSC.ArrayBuffer.empty.toJS(global, null); + return JSC.ArrayBuffer.create(global, "", .ArrayBuffer); } var bytes = this.InternalBlob.toOwnedSlice(); |