mirror of https://github.com/node-red/node-red.git
Don't allow tabs or subflows to be added with new flow
parent
da0ce9fe0d
commit
4d0950215f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue