diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/webcore/response.zig | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/bun.js/webcore/response.zig b/src/bun.js/webcore/response.zig index 99205d440..c47648a5d 100644 --- a/src/bun.js/webcore/response.zig +++ b/src/bun.js/webcore/response.zig @@ -4673,19 +4673,12 @@ pub const Body = struct { pub fn fromJS(globalThis: *JSGlobalObject, value: JSValue) ?Value { value.ensureStillAlive(); - if (value.isEmpty() or value.isUndefined()) { + if (value.isEmptyOrUndefinedOrNull()) { return Body.Value{ .Empty = void{}, }; } - if (value.isNull()) { - var null_str: [4]u8 = "null".*; - - // this looks like a pointer to stack memory, but it will be copied - return Body.Value.createBlobValue(&null_str, undefined, true); - } - const js_type = value.jsType(); if (js_type.isStringLike()) { |