mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Do not assume subflows exist when deleting nodes
This commit is contained in:
parent
b4c92b457a
commit
9c8d9550a7
@ -835,6 +835,7 @@ RED.view = (function() {
|
||||
node.dirty = true;
|
||||
}
|
||||
}
|
||||
if (removedSubflowOutputs.length > 0) {
|
||||
removedSubflowOutputs.sort(function(a,b) { return b.i-a.i});
|
||||
for (i=0;i<removedSubflowOutputs.length;i++) {
|
||||
var output = removedSubflowOutputs[i];
|
||||
@ -862,8 +863,8 @@ RED.view = (function() {
|
||||
activeSubflow.out[j].dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Assume 0/1 inputs
|
||||
|
||||
if (removedSubflowInputs.length == 1) {
|
||||
var input = removedSubflowInputs[0];
|
||||
var subflowRemovedInputLinks = [];
|
||||
@ -880,6 +881,7 @@ RED.view = (function() {
|
||||
$("#workspace-subflow-add-input").toggleClass("disabled",false);
|
||||
}
|
||||
|
||||
if (activeSubflow) {
|
||||
RED.nodes.eachNode(function(n) {
|
||||
if (n.type == "subflow:"+activeSubflow.id) {
|
||||
n.changed = true;
|
||||
@ -892,6 +894,7 @@ RED.view = (function() {
|
||||
n.dirty = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
moving_set = [];
|
||||
if (removedNodes.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user