mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Only validate nodes once they have all been imported
This ensures any checks for dependent config nodes will pass
This commit is contained in:
parent
a7a949377b
commit
4c28b5b227
@ -1377,10 +1377,6 @@ RED.nodes = (function() {
|
||||
return (otherNode && otherNode.z === activeWorkspace)
|
||||
});
|
||||
}
|
||||
|
||||
// With all properties now remapped to point at valid nodes,
|
||||
// we can validate the node
|
||||
RED.editor.validateNode(n);
|
||||
}
|
||||
for (i=0;i<new_subflows.length;i++) {
|
||||
n = new_subflows[i];
|
||||
@ -1435,6 +1431,12 @@ RED.nodes = (function() {
|
||||
for (i=0;i<new_nodes.length;i++) {
|
||||
var node = new_nodes[i];
|
||||
addNode(node);
|
||||
}
|
||||
// Finally validate them all.
|
||||
// This has to be done after everything is added so that any checks for
|
||||
// dependent config nodes will pass
|
||||
for (i=0;i<new_nodes.length;i++) {
|
||||
var node = new_nodes[i];
|
||||
RED.editor.validateNode(node);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user