diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js index d33c3aabe..ca4baa586 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js @@ -427,6 +427,10 @@ RED.sidebar.info.outliner = (function() { } else { delete configNodeTypes[parentItem.parent.parent.id]; parentItem.parent.treeList.remove(); + if (parentItem.parent.parent.children.length === 0) { + parentItem.parent.parent.treeList.addChild(getEmptyItem(parentItem.parent.parent.id)); + } + } } } else { @@ -494,6 +498,9 @@ RED.sidebar.info.outliner = (function() { } else { delete configNodeTypes[n.z]; parent.parent.treeList.remove(); + if (parent.parent.parent.children.length === 0) { + parent.parent.parent.treeList.addChild(getEmptyItem(parent.parent.parent.id)); + } } } } else {