1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Recursively validate nodes after editing config node directly

This commit is contained in:
Nick O'Leary 2016-04-26 16:56:13 +01:00
parent e56da17957
commit bac8a3092f

View File

@ -898,10 +898,20 @@ RED.editor = (function() {
updateNodeCredentials(editing_config_node,configTypeDef.credentials,"node-config-input");
}
validateNode(editing_config_node);
for (var i=0;i<editing_config_node.users.length;i++) {
var user = editing_config_node.users[i];
var validatedNodes = {};
validatedNodes[editing_config_node.id] = true;
var userStack = editing_config_node.users.slice();
while(userStack.length > 0) {
var user = userStack.pop();
if (!validatedNodes[user.id]) {
validatedNodes[user.id] = true;
if (user.users) {
userStack = userStack.concat(user.users);
}
validateNode(user);
}
}
RED.nodes.dirty(true);
RED.view.redraw(true);
RED.tray.close(function() {