mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Just move the block before the Id is updated
This commit is contained in:
parent
1d342a778d
commit
bb91a08939
@ -2379,6 +2379,13 @@ RED.nodes = (function() {
|
||||
} else {
|
||||
delete n.g
|
||||
}
|
||||
// If importing into a subflow, ensure an outbound-link doesn't get added
|
||||
if (activeSubflow && /^link /.test(n.type) && n.links) {
|
||||
n.links = n.links.filter(function(id) {
|
||||
const otherNode = node_map[id] || RED.nodes.node(id);
|
||||
return (otherNode && otherNode.z === activeWorkspace);
|
||||
});
|
||||
}
|
||||
for (var d3 in n._def.defaults) {
|
||||
if (n._def.defaults.hasOwnProperty(d3)) {
|
||||
if (n._def.defaults[d3].type) {
|
||||
@ -2402,15 +2409,6 @@ RED.nodes = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If importing into a subflow, ensure an outbound-link doesn't
|
||||
// get added
|
||||
if (activeSubflow && /^link /.test(n.type) && n.links) {
|
||||
n.links = n.links.filter(function(id) {
|
||||
const nodeImported = new_nodes.filter(function(n) { return n.id === id; });
|
||||
const otherNode = (nodeImported.length ? nodeImported[0] : null) || RED.nodes.node(id);
|
||||
return (otherNode && otherNode.z === activeWorkspace);
|
||||
});
|
||||
}
|
||||
}
|
||||
for (i=0;i<new_subflows.length;i++) {
|
||||
n = new_subflows[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user