mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
zig: prefer .jsUndefined() over .undefined for JSValue (#20332)
This commit is contained in:
@@ -54,12 +54,12 @@ pub fn setCwd(this: *ParsedShellScript, globalThis: *JSGlobalObject, callframe:
|
||||
};
|
||||
const str = try bun.String.fromJS(str_js, globalThis);
|
||||
this.cwd = str;
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
pub fn setQuiet(this: *ParsedShellScript, _: *JSGlobalObject, _: *JSC.CallFrame) bun.JSError!JSC.JSValue {
|
||||
this.quiet = true;
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
pub fn setEnv(this: *ParsedShellScript, globalThis: *JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
|
||||
@@ -82,7 +82,7 @@ pub fn setEnv(this: *ParsedShellScript, globalThis: *JSGlobalObject, callframe:
|
||||
while (try object_iter.next()) |key| {
|
||||
const keyslice = key.toOwnedSlice(bun.default_allocator) catch bun.outOfMemory();
|
||||
var value = object_iter.value;
|
||||
if (value == .undefined) continue;
|
||||
if (value.isUndefined()) continue;
|
||||
|
||||
const value_str = try value.getZigString(globalThis);
|
||||
const slice = value_str.toOwnedSlice(bun.default_allocator) catch bun.outOfMemory();
|
||||
@@ -97,7 +97,7 @@ pub fn setEnv(this: *ParsedShellScript, globalThis: *JSGlobalObject, callframe:
|
||||
previous.deinit();
|
||||
}
|
||||
this.export_env = env;
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
pub fn createParsedShellScript(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSValue {
|
||||
|
||||
Reference in New Issue
Block a user