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

Handle missing config nodes when validating node properties

This commit is contained in:
Nick O'Leary 2016-03-13 13:25:38 +00:00
parent fed49e3718
commit 12c4561aba

View File

@ -126,8 +126,8 @@ RED.editor = (function() {
if (!value || value == "_ADD_") {
valid = definition[property].hasOwnProperty("required") && !definition[property].required;
} else {
var v = RED.nodes.node(value).valid;
valid = (v==null || v);
var configNode = RED.nodes.node(value);
valid = (configNode !== null && (configNode.valid == null || configNode.valid));
}
}
return valid;