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

Fix check for existing config nodes in subflow export set

This commit is contained in:
Nick O'Leary 2021-01-29 10:16:40 +00:00
parent dad47ade38
commit 3bd1bfc769
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -852,6 +852,7 @@ RED.nodes = (function() {
RED.nodes.eachConfig(function(n) {
if (n.z == subflowId) {
subflowSet.push(n);
exportedConfigNodes[n.id] = true;
}
});
var exportableSubflow = createExportableNodeSet(subflowSet, exportedIds, exportedSubflows, exportedConfigNodes);
@ -859,7 +860,6 @@ RED.nodes = (function() {
}
}
if (node.type !== "subflow") {
if (nns.findIndex((v) => v && v.id === node.id) == -1) {
var convertedNode = RED.nodes.convertNode(node);
for (var d in node._def.defaults) {
if (node._def.defaults[d].type) {
@ -889,7 +889,6 @@ RED.nodes = (function() {
}
}
nns.push(convertedNode);
}
if (node.type === "group") {
nns = nns.concat(createExportableNodeSet(node.nodes, exportedIds, exportedSubflows, exportedConfigNodes));
}