1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Outliner - add empty item when last config node moved

This commit is contained in:
Nick O'Leary 2020-06-24 13:18:46 +01:00
parent 209c5f337c
commit 4c98db2269
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -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 {