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

Handle a node having wires in the editor on ports it no longer has

Fixes #1724
This commit is contained in:
Nick O'Leary 2018-05-17 11:27:28 +01:00
parent db87b0dfa5
commit 0a82459233
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -491,9 +491,11 @@ RED.nodes = (function() {
for (var j=0;j<wires.length;j++) {
var w = wires[j];
if (w.target.type != "subflow") {
if (w.sourcePort < node.wires.length) {
node.wires[w.sourcePort].push(w.target.id);
}
}
}
if (n.inputs > 0 && n.inputLabels && !/^\s*$/.test(n.inputLabels.join(""))) {
node.inputLabels = n.inputLabels.slice();