[FIX] devtools: fix inspected path

This commit fixes the handling of the inspected path in the
getComponentsTree method so that it is reset when the given one does
not exist anymore. It solves a crash of the method anytime this would
happen which would prevent the tree from updating correctly.
This commit is contained in:
Julien Carion (juca)
2023-08-02 15:33:28 +02:00
committed by Sam Degueldre
parent 105ec7ced8
commit 9823a4e7dd
@@ -1527,6 +1527,9 @@
// Use inspectedPath to specify the path of the selected component
getComponentsTree(inspectedPath = null, oldTrees = null, oldDetails = null) {
const appsArray = [...this.apps];
if (inspectedPath && !this.getComponentNode(inspectedPath)) {
inspectedPath = null;
}
const trees = appsArray.map((app, index) => {
let oldTree;
if (oldTrees) {