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

Fix empty item handling for subflows/config in outliner

This commit is contained in:
Nick O'Leary 2020-06-14 22:46:59 +01:00
parent 2d0ca20a03
commit 0e454b08c8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -22,14 +22,19 @@ RED.sidebar.info.outliner = (function() {
{ {
id: "__subflow__", id: "__subflow__",
label: RED._("menu.label.subflows"), label: RED._("menu.label.subflows"),
children: [] children: [
getEmptyItem("__subflow__")
]
}, },
{ {
id: "__global__", id: "__global__",
label: RED._("sidebar.info.globalConfig"), label: RED._("sidebar.info.globalConfig"),
children: [] children: [
getEmptyItem("__global__")
]
} }
] ]
flowList = flowData[0]; flowList = flowData[0];
subflowList = flowData[1]; subflowList = flowData[1];
globalConfigNodes = flowData[2]; globalConfigNodes = flowData[2];
@ -273,9 +278,6 @@ RED.sidebar.info.outliner = (function() {
} }
}) })
subflowList.treeList.addChild(getEmptyItem("__subflow__"));
globalConfigNodes.treeList.addChild(getEmptyItem("__global__"));
RED.events.on("projects:load", onProjectLoad) RED.events.on("projects:load", onProjectLoad)
RED.events.on("flows:add", onFlowAdd) RED.events.on("flows:add", onFlowAdd)