diff options
author | 2022-11-15 23:23:23 -0800 | |
---|---|---|
committer | 2022-11-15 23:23:23 -0800 | |
commit | 1d02104c518ef67f7b6f9871bbf7be3babc4d1f4 (patch) | |
tree | f7ecb8ae8d39df1ef4775f40953b6f670a80e019 | |
parent | 4f22c39651bf57f929876bd58e83bf0b3156a9d1 (diff) | |
download | bun-1d02104c518ef67f7b6f9871bbf7be3babc4d1f4.tar.gz bun-1d02104c518ef67f7b6f9871bbf7be3babc4d1f4.tar.zst bun-1d02104c518ef67f7b6f9871bbf7be3babc4d1f4.zip |
Fix assertion failure
-rw-r--r-- | src/bun.js/webcore/response.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/webcore/response.zig b/src/bun.js/webcore/response.zig index fff40669c..80ffc62ec 100644 --- a/src/bun.js/webcore/response.zig +++ b/src/bun.js/webcore/response.zig @@ -4026,6 +4026,10 @@ pub const AnyBlob = union(enum) { // return owned; // }, .InternalBlob => { + if (this.InternalBlob.bytes.items.len == 0) { + return ZigString.Empty.toValue(global); + } + const owned = this.InternalBlob.toStringOwned(global); this.* = .{ .Blob = .{} }; return owned; |