mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
Allow using Proxy and module namespace objects in APIs (#15043)
This commit is contained in:
@@ -1143,7 +1143,7 @@ pub const Formatter = struct {
|
||||
};
|
||||
}
|
||||
|
||||
if (js_type.canGet()) {
|
||||
if (js_type.canGet() and js_type != .ProxyObject) {
|
||||
// Attempt to get custom formatter
|
||||
if (value.fastGet(globalThis, .inspectCustom)) |callback_value| {
|
||||
if (callback_value.isCallable(globalThis.vm())) {
|
||||
@@ -1202,7 +1202,7 @@ pub const Formatter = struct {
|
||||
}
|
||||
|
||||
// Is this a react element?
|
||||
if (js_type.isObject()) {
|
||||
if (js_type.isObject() and js_type != .ProxyObject) {
|
||||
if (value.getOwnTruthy(globalThis, "$$typeof")) |typeof_symbol| {
|
||||
var reactElement = ZigString.init("react.element");
|
||||
var react_fragment = ZigString.init("react.fragment");
|
||||
|
||||
Reference in New Issue
Block a user