createEmptyObjectWithNullPrototype

This commit is contained in:
Dylan Conway
2023-11-30 16:48:53 -08:00
parent 70039ff038
commit 54df5c032d
3 changed files with 7 additions and 13 deletions

View File

@@ -622,7 +622,7 @@ pub fn parseArgs(globalThis: *JSGlobalObject, config_obj: JSValue) !JSValue {
log("Phase 2: parse options from tokens (tokens.len={d})", .{tokens.items.len});
// note that "values" needs to have a null prototype instead of Object, to avoid issues such as "values.toString"` being defined
var result_values = JSValue.constructEmptyObject(globalThis, null, 0);
var result_values = JSValue.createEmptyObjectWithNullPrototype(globalThis);
var result_positionals = JSC.JSValue.createEmptyArray(globalThis, 0);
var result_positionals_len: u32 = 0;
for (tokens.items) |t| {