diff options
author | 2022-08-18 19:23:45 -0700 | |
---|---|---|
committer | 2022-08-18 19:23:45 -0700 | |
commit | 5eeb704f25200af7ad8819c35bcfd16b8b1bff49 (patch) | |
tree | 23a15558b2975d0ab87bd9fe484b643cadc85942 | |
parent | e3c2a95e5ff4e6c6b63839f4773cc3f5aeadddc8 (diff) | |
download | bun-5eeb704f25200af7ad8819c35bcfd16b8b1bff49.tar.gz bun-5eeb704f25200af7ad8819c35bcfd16b8b1bff49.tar.zst bun-5eeb704f25200af7ad8819c35bcfd16b8b1bff49.zip |
Fix console.log printing `[native code]` for too many things
-rw-r--r-- | src/bun.js/bindings/exports.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig index a362af743..8f8f6f6f2 100644 --- a/src/bun.js/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -1326,11 +1326,16 @@ pub const ZigConsoleClient = struct { }; } - if (callable) { + if (callable and js_type == .JSFunction) { return .{ .tag = .Function, .cell = js_type, }; + } else if (callable and js_type == .InternalFunction) { + return .{ + .tag = .Object, + .cell = js_type, + }; } // Is this a react element? |