mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix node_map
does not contain as key the new id of a copied node
This commit is contained in:
parent
61b12f6bbe
commit
476016cbcc
@ -2406,8 +2406,9 @@ RED.nodes = (function() {
|
||||
// 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)
|
||||
const otherNodeInMap = Object.values(node_map).filter(function(n) { return n.id === id; });
|
||||
const otherNode = (otherNodeInMap.length ? otherNodeInMap[0] : null) || RED.nodes.node(id);
|
||||
return (otherNode && otherNode.z === activeWorkspace);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user