aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/webcore/blob.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/webcore/blob.zig b/src/bun.js/webcore/blob.zig
index a593bfe05..5a41f5f8c 100644
--- a/src/bun.js/webcore/blob.zig
+++ b/src/bun.js/webcore/blob.zig
@@ -2507,11 +2507,15 @@ pub const Blob = struct {
globalThis: *JSC.JSGlobalObject,
value: JSC.JSValue,
) callconv(.C) bool {
- const zig_str = if (value.isString())
+ var zig_str = if (value.isString())
value.getZigString(globalThis)
else
ZigString.Empty;
+ if (!zig_str.isAllASCII()) {
+ zig_str = ZigString.Empty;
+ }
+
if (zig_str.eql(ZigString.init(this.content_type))) {
return true;
}