Handle subflow internal node wired to a non-existant node

Fixes #2202
This commit is contained in:
Nick O'Leary 2019-06-13 14:22:59 +01:00
parent 19f2c5e07f
commit ae2162beaf
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 5 additions and 2 deletions

View File

@ -409,7 +409,11 @@ function remapSubflowNodes(nodes,nodeMap) {
for (j=0;j<outputs.length;j++) {
wires = outputs[j];
for (k=0;k<wires.length;k++) {
outputs[j][k] = nodeMap[outputs[j][k]].id
if (nodeMap[outputs[j][k]]) {
outputs[j][k] = nodeMap[outputs[j][k]].id
} else {
outputs[j][k] = null;
}
}
}
}
@ -421,7 +425,6 @@ function remapSubflowNodes(nodes,nodeMap) {
for (var prop in node) {
if (node.hasOwnProperty(prop) && prop !== '_alias') {
if (nodeMap[node[prop]]) {
//console.log("Mapped",node.type,node.id,prop,nodeMap[node[prop]].id);
node[prop] = nodeMap[node[prop]].id;
}
}