Don't allow tabs or subflows to be added with new flow

This commit is contained in:
Nick O'Leary 2015-12-14 10:46:54 +00:00
parent da0ce9fe0d
commit 4d0950215f
1 changed files with 6 additions and 0 deletions

View File

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