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

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

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);