From 984b8bf0c864310bb373a57aad1fea0b002b74fe Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 15 Jun 2021 15:33:13 -0400 Subject: fix(inspector): Deno.inspect should inspect the object the proxy represents rather than the target of the proxy (#10977) --- extensions/console/02_console.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'extensions/console/02_console.js') diff --git a/extensions/console/02_console.js b/extensions/console/02_console.js index a8098423d..8fc6e93b2 100644 --- a/extensions/console/02_console.js +++ b/extensions/console/02_console.js @@ -429,10 +429,8 @@ inspectOptions, ) { const proxyDetails = core.getProxyDetails(value); - if (proxyDetails != null) { - return inspectOptions.showProxy - ? inspectProxy(proxyDetails, level, inspectOptions) - : inspectValue(proxyDetails[0], level, inspectOptions); + if (proxyDetails != null && inspectOptions.showProxy) { + return inspectProxy(proxyDetails, level, inspectOptions); } const green = maybeColor(colors.green, inspectOptions); -- cgit v1.2.3