diff --git a/red/runtime/nodes/flows/index.js b/red/runtime/nodes/flows/index.js index 40a3b642f..af4009129 100644 --- a/red/runtime/nodes/flows/index.js +++ b/red/runtime/nodes/flows/index.js @@ -402,6 +402,9 @@ function addFlow(flow) { // TODO nls return when.reject(new Error('duplicate id')); } + if (node.type === 'tab' || node.type === 'subflow') { + return when.reject(new Error('invalid node type: '+node.type)); + } node.z = flow.id; nodes.push(node); } @@ -412,6 +415,9 @@ function addFlow(flow) { // TODO nls return when.reject(new Error('duplicate id')); } + if (node.type === 'tab' || node.type === 'subflow') { + return when.reject(new Error('invalid node type: '+node.type)); + } node.z = flow.id; nodes.push(node); }