diff options
author | 2022-11-27 07:26:16 -0800 | |
---|---|---|
committer | 2022-11-27 07:26:16 -0800 | |
commit | 964c4037deb90283f12733ea7d8a660bc0430f88 (patch) | |
tree | 3ae5bb75dee2daf8922d0d873970cf21db2b009b | |
parent | 1bc76511ec770dc78a2fcfa8821781344c0e8e1c (diff) | |
download | bun-964c4037deb90283f12733ea7d8a660bc0430f88.tar.gz bun-964c4037deb90283f12733ea7d8a660bc0430f88.tar.zst bun-964c4037deb90283f12733ea7d8a660bc0430f88.zip |
`[console.log]` log Proxy objects
-rw-r--r-- | src/bun.js/bindings/exports.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig index e5f9a1590..f18d47329 100644 --- a/src/bun.js/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -1380,6 +1380,13 @@ pub const ZigConsoleClient = struct { }; } + if (js_type == .PureForwardingProxy) { + return Tag.get( + JSC.JSValue.c(JSC.C.JSObjectGetProxyTarget(value.asObjectRef())), + globalThis, + ); + } + // Is this a react element? if (js_type.isObject()) { if (value.get(globalThis, "$$typeof")) |typeof_symbol| { |