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

Merge pull request #4172 from wooferguy/Zombie-Junctions-Fix

Check for group
This commit is contained in:
Nick O'Leary 2023-05-22 12:51:46 +01:00 committed by GitHub
commit 32a49a1ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2646,6 +2646,16 @@ RED.view = (function() {
var result = RED.nodes.removeJunction(node) var result = RED.nodes.removeJunction(node)
removedJunctions.push(node); removedJunctions.push(node);
removedLinks = removedLinks.concat(result.links); removedLinks = removedLinks.concat(result.links);
if (node.g) {
var group = RED.nodes.group(node.g);
if (selectedGroups.indexOf(group) === -1) {
// Don't use RED.group.removeFromGroup as that emits
// a change event on the node - but we're deleting it
var index = group.nodes.indexOf(node);
group.nodes.splice(index,1);
RED.group.markDirty(group);
}
}
} else { } else {
if (node.direction === "out") { if (node.direction === "out") {
removedSubflowOutputs.push(node); removedSubflowOutputs.push(node);