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

Handle un-validated config nodes on open

Part of #33
This commit is contained in:
Nicholas O'Leary 2013-11-18 21:17:29 +00:00
parent cbe57aa96c
commit 1fc4a65307

View File

@ -102,7 +102,8 @@ RED.editor = function() {
if (!value || value == "_ADD_") { if (!value || value == "_ADD_") {
valid = false; valid = false;
} else { } else {
valid = RED.nodes.node(value).valid; var v = RED.nodes.node(value).valid;
valid = (v==null || v);
} }
} }
return valid; return valid;
@ -214,10 +215,10 @@ RED.editor = function() {
var removedLinks = updateNodeProperties(editing_node); var removedLinks = updateNodeProperties(editing_node);
if (changed) { if (changed) {
editing_node.changed = true;
RED.view.dirty(true); RED.view.dirty(true);
RED.history.push({t:'edit',node:editing_node,changes:changes,links:removedLinks,dirty:wasDirty}); RED.history.push({t:'edit',node:editing_node,changes:changes,links:removedLinks,dirty:wasDirty});
} }
editing_node.changed = true;
editing_node.dirty = true; editing_node.dirty = true;
validateNode(editing_node); validateNode(editing_node);
RED.view.redraw(); RED.view.redraw();