diff --git a/red/nodes/Flow.js b/red/nodes/Flow.js index 91fe5260b..b5493c130 100644 --- a/red/nodes/Flow.js +++ b/red/nodes/Flow.js @@ -160,7 +160,7 @@ function createSubflow(sf,sfn,subflows) { if (!node._originalWires) { node._originalWires = clone(node.wires); } - node.wires[wires[j].port] = node.wires[wires[j].port].concat(sfn.wires[i]); + node.wires[wires[j].port] = (node.wires[wires[j].port]||[]).concat(sfn.wires[i]); } } } @@ -353,10 +353,10 @@ Flow.prototype.parseConfig = function(config) { Flow.prototype.start = function(configDiff) { if (configDiff) { - for (var i=0;i