mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
zig: make throw use JSError (#15444)
This commit is contained in:
@@ -474,8 +474,7 @@ pub const json = struct {
|
||||
defer str.deref();
|
||||
const parse_result = JSValue.parse(str.toJS(globalObject), globalObject);
|
||||
if (parse_result.isAnyError()) {
|
||||
globalObject.throwValue(parse_result);
|
||||
return error.JSError;
|
||||
return globalObject.throwValue(parse_result);
|
||||
}
|
||||
|
||||
return parse_result;
|
||||
|
||||
Reference in New Issue
Block a user