mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add config node to refer to when exporting subflow
This commit is contained in:
parent
3a0074d96e
commit
dad47ade38
@ -849,11 +849,17 @@ RED.nodes = (function() {
|
|||||||
subflowSet.push(n);
|
subflowSet.push(n);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
RED.nodes.eachConfig(function(n) {
|
||||||
|
if (n.z == subflowId) {
|
||||||
|
subflowSet.push(n);
|
||||||
|
}
|
||||||
|
});
|
||||||
var exportableSubflow = createExportableNodeSet(subflowSet, exportedIds, exportedSubflows, exportedConfigNodes);
|
var exportableSubflow = createExportableNodeSet(subflowSet, exportedIds, exportedSubflows, exportedConfigNodes);
|
||||||
nns = exportableSubflow.concat(nns);
|
nns = exportableSubflow.concat(nns);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node.type !== "subflow") {
|
if (node.type !== "subflow") {
|
||||||
|
if (nns.findIndex((v) => v && v.id === node.id) == -1) {
|
||||||
var convertedNode = RED.nodes.convertNode(node);
|
var convertedNode = RED.nodes.convertNode(node);
|
||||||
for (var d in node._def.defaults) {
|
for (var d in node._def.defaults) {
|
||||||
if (node._def.defaults[d].type) {
|
if (node._def.defaults[d].type) {
|
||||||
@ -883,6 +889,7 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nns.push(convertedNode);
|
nns.push(convertedNode);
|
||||||
|
}
|
||||||
if (node.type === "group") {
|
if (node.type === "group") {
|
||||||
nns = nns.concat(createExportableNodeSet(node.nodes, exportedIds, exportedSubflows, exportedConfigNodes));
|
nns = nns.concat(createExportableNodeSet(node.nodes, exportedIds, exportedSubflows, exportedConfigNodes));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user