diff --git a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx index dfb13db5e..3bdf6ecc4 100644 --- a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx +++ b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx @@ -194,7 +194,11 @@ function Visualization2DNode({ //if there is an active child don't draw the other children //this means we don't draw overlapping activities / tabs etc - if (node.activeChildIdx && node.activeChildIdx < node.children.length) { + if ( + node.activeChildIdx != null && + node.activeChildIdx >= 0 && + node.activeChildIdx < node.children.length + ) { nestedChildren = [node.children[node.activeChildIdx]]; } else { nestedChildren = node.children;