diff --git a/desktop/plugins/public/layout/Inspector.tsx b/desktop/plugins/public/layout/Inspector.tsx index 44632e03e..3b2893d77 100644 --- a/desktop/plugins/public/layout/Inspector.tsx +++ b/desktop/plugins/public/layout/Inspector.tsx @@ -281,7 +281,7 @@ export default class Inspector extends Component { // When opening the inspector for the first time, expand all elements that // contain only 1 child recursively. async performInitialExpand(element: Element | undefined): Promise { - if (!element || !element.children.length) { + if (!element || !element.children || !element.children.length) { // element has no children so we're as deep as we can be return; }