[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.
This commit is contained in:
Julien Carion (juca)
2023-05-11 10:05:03 +02:00
committed by Géry Debongnie
parent fe31f93c94
commit 77a413d750
2 changed files with 2 additions and 15 deletions
@@ -38,8 +38,8 @@
</t>
</ul>
</div>
<t t-if="props.object.toggled">
<t t-foreach="props.object.children" t-as="child" t-key="child.name">
<t t-if="props.object.toggled" t-key="contextMenuId">
<t t-foreach="props.object.children" t-as="child" t-key="child_index">
<ObjectTreeElement t-if="props.object.objectType === 'subscription'" object="child" keys="props.keys"/>
<ObjectTreeElement t-else="" object="child"/>
</t>
@@ -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,