diff options
author | 2023-09-19 02:34:39 +0200 | |
---|---|---|
committer | 2023-09-18 17:34:39 -0700 | |
commit | c55b2c56a42ee4f317f7732ddf4ae629abe9d4eb (patch) | |
tree | 24ff837dd9e90c9c0a4ab6c2130c66018f04a340 /src/bun.js/webcore/blob.zig | |
parent | eb1dc7eede31b12726ae320263850fefaaf490f3 (diff) | |
download | bun-c55b2c56a42ee4f317f7732ddf4ae629abe9d4eb.tar.gz bun-c55b2c56a42ee4f317f7732ddf4ae629abe9d4eb.tar.zst bun-c55b2c56a42ee4f317f7732ddf4ae629abe9d4eb.zip |
fix: remove unneeded branch in toJSONWithBytes (#5684)
This branch resulted in the same the same statement so having the branch,
is not needed
Diffstat (limited to 'src/bun.js/webcore/blob.zig')
-rw-r--r-- | src/bun.js/webcore/blob.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bun.js/webcore/blob.zig b/src/bun.js/webcore/blob.zig index 7ce254ca8..49564c1fd 100644 --- a/src/bun.js/webcore/blob.zig +++ b/src/bun.js/webcore/blob.zig @@ -3673,11 +3673,7 @@ pub const Blob = struct { if (comptime lifetime != .temporary) this.setIsASCIIFlag(true); } - if (comptime lifetime == .temporary) { - return ZigString.init(buf).toJSONObject(global); - } else { - return ZigString.init(buf).toJSONObject(global); - } + return ZigString.init(buf).toJSONObject(global); } pub fn toFormDataWithBytes(this: *Blob, global: *JSGlobalObject, buf: []u8, comptime _: Lifetime) JSValue { |