diff --git a/components/default-resources/resources/debugger.js b/components/default-resources/resources/debugger.js index c6e2718d7bb..1863a44b36f 100644 --- a/components/default-resources/resources/debugger.js +++ b/components/default-resources/resources/debugger.js @@ -168,6 +168,7 @@ function extractOwnProperties(obj, depth) { // previewers.Function.push(function FunctionPreviewer(obj, depth) { + const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth); let function_details = { name: obj.name, displayName: obj.displayName, @@ -177,10 +178,9 @@ previewers.Function.push(function FunctionPreviewer(obj, depth) { } if (depth > 1) { - return { kind: "Object", function: function_details }; + return { kind: "Object", function: function_details, ownPropertiesLength }; } - const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth); return { kind: "Object", ownProperties, @@ -225,11 +225,12 @@ previewers.Array.push(function ArrayPreviewer(obj, depth) { // Generic fallback for object previewer // previewers.Object.push(function ObjectPreviewer(obj, depth) { + const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth); + if (depth > 1) { - return { kind: "Object" }; + return { kind: "Object", ownPropertiesLength }; } - const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth); return { kind: "Object", ownProperties,