From 77a413d75016ed082bb52215774a2ffcc1aea303 Mon Sep 17 00:00:00 2001 From: "Julien Carion (juca)" Date: Thu, 11 May 2023 10:05:03 +0200 Subject: [PATCH] [FIX] devtools: fix issue when treeElement have same name This commit fixes the key of the sub tree elements in the details window to be 100% unique since the name of the elements could not be unique so it would silently crash and not display. It also removes the default size property of maps and sets since there's already a getter available for it. --- .../object_tree_element/object_tree_element.xml | 4 ++-- .../src/page_scripts/owl_devtools_global_hook.js | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/devtools/src/devtools_app/devtools_window/components_tab/details_window/object_tree_element/object_tree_element.xml b/tools/devtools/src/devtools_app/devtools_window/components_tab/details_window/object_tree_element/object_tree_element.xml index 0925b957..3f8e8a83 100644 --- a/tools/devtools/src/devtools_app/devtools_window/components_tab/details_window/object_tree_element/object_tree_element.xml +++ b/tools/devtools/src/devtools_app/devtools_window/components_tab/details_window/object_tree_element/object_tree_element.xml @@ -38,8 +38,8 @@ - - + + diff --git a/tools/devtools/src/page_scripts/owl_devtools_global_hook.js b/tools/devtools/src/page_scripts/owl_devtools_global_hook.js index fb9a2cd1..787760d8 100644 --- a/tools/devtools/src/page_scripts/owl_devtools_global_hook.js +++ b/tools/devtools/src/page_scripts/owl_devtools_global_hook.js @@ -1012,19 +1012,6 @@ children.push(entries); index++; } - const size = this.serializeObjectChild( - obj, - { type: "item", value: "size", childIndex: children.length }, - depth, - objType, - path, - oldBranch.children[index], - oldTree - ); - if (size) { - children.push(size); - index++; - } Reflect.ownKeys(obj).forEach((key) => { const child = this.serializeObjectChild( obj,