add port if wires array > number of ports declared.

This commit is contained in:
Dave Conway-Jones 2017-01-06 14:06:30 +00:00
parent d131addd63
commit e6de26736b
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ RED.nodes = (function() {
configNodes[n.id] = n;
} else {
n.ports = [];
if (n.wires && (n.wires.length > n.outputs)) { n.outputs = n.wires.length; }
if (n.outputs) {
for (var i=0;i<n.outputs;i++) {
n.ports.push(i);