aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-03 23:56:40 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-03 23:56:40 -0800
commitde9a2b9fe54cb7fd9696a3fa8edfa9c42829280d (patch)
tree2ee6fdcdb939f5a6c144ecaf72e28ceb4bd40d64 /src/bun.js
parent201cbb20e41a0997e56a0cf2fca4096d7392c14a (diff)
downloadbun-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`
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/webcore/response.zig2
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();