From c17108883878085ed594d549d642e4a11929da04 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 26 Jun 2020 17:21:20 +0100 Subject: [PATCH] Fix reparenting nodes in outliner when they change --- .../@node-red/editor-client/src/js/ui/tab-info-outliner.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ca4baa586..222aafd45 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 @@ -409,7 +409,11 @@ RED.sidebar.info.outliner = (function() { } else { existingObject.element.find(".red-ui-info-outline-item-label").html(" "); } - if (parent !== existingObject.parent.parent.flow) { + var existingParent = existingObject.parent.id; + if (!existingParent) { + existingParent = existingObject.parent.parent.flow + } + if (parent !== existingParent) { var parentItem = existingObject.parent; existingObject.treeList.remove(true); if (parentItem.children.length === 0) {