zig: prefer .jsUndefined() over .undefined for JSValue (#20332)

This commit is contained in:
Meghan Denny
2025-06-12 12:18:46 -08:00
committed by GitHub
parent d6590c4bfa
commit dedd433cbf
84 changed files with 569 additions and 574 deletions

View File

@@ -320,7 +320,7 @@ pub fn attrTest(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.
.initOutsideOfBundler(&import_records),
) catch |e| {
bun.handleErrorReturnTrace(e, @errorReturnTrace());
return .undefined;
return .jsUndefined();
};
return bun.String.fromBytes(result.code).toJS(globalThis);

View File

@@ -55,7 +55,7 @@ const OutputColorFormat = enum {
};
fn colorIntFromJS(globalThis: *JSC.JSGlobalObject, input: JSC.JSValue, comptime property: []const u8) bun.JSError!i32 {
if (input == .zero or input == .undefined or !input.isNumber()) {
if (input == .zero or input.isUndefined() or !input.isNumber()) {
return globalThis.throwInvalidArgumentType("color", property, "integer");
}