Fix new_nodes should be used instead of node_map

This commit is contained in:
GogoVega 2024-06-05 14:12:35 +02:00
parent 476016cbcc
commit 1d342a778d
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B

View File

@ -2406,8 +2406,8 @@ RED.nodes = (function() {
// get added
if (activeSubflow && /^link /.test(n.type) && n.links) {
n.links = n.links.filter(function(id) {
const otherNodeInMap = Object.values(node_map).filter(function(n) { return n.id === id; });
const otherNode = (otherNodeInMap.length ? otherNodeInMap[0] : null) || RED.nodes.node(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);
});
}