diff options
Diffstat (limited to 'ext/console/02_console.js')
-rw-r--r-- | ext/console/02_console.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/console/02_console.js b/ext/console/02_console.js index 4663ded73..a16095179 100644 --- a/ext/console/02_console.js +++ b/ext/console/02_console.js @@ -661,7 +661,8 @@ if (ctxHas(value)) { return handleCircular(value, cyan); } - return inspectObject(value, level, inspectOptions); + + return inspectObject(value, level, inspectOptions, proxyDetails); default: // Not implemented is red return red("[Not Implemented]"); @@ -1200,6 +1201,7 @@ value, level, inspectOptions, + proxyDetails, ) { if (customInspect in value && typeof value[customInspect] === "function") { return String(value[customInspect](inspect)); @@ -1240,9 +1242,17 @@ } else if (ObjectPrototypeIsPrototypeOf(DatePrototype, value)) { return inspectDate(value, inspectOptions); } else if (ObjectPrototypeIsPrototypeOf(SetPrototype, value)) { - return inspectSet(value, level, inspectOptions); + return inspectSet( + proxyDetails ? proxyDetails[0] : value, + level, + inspectOptions, + ); } else if (ObjectPrototypeIsPrototypeOf(MapPrototype, value)) { - return inspectMap(value, level, inspectOptions); + return inspectMap( + proxyDetails ? proxyDetails[0] : value, + level, + inspectOptions, + ); } else if (ObjectPrototypeIsPrototypeOf(WeakSetPrototype, value)) { return inspectWeakSet(inspectOptions); } else if (ObjectPrototypeIsPrototypeOf(WeakMapPrototype, value)) { |