Allow a config-node be marked as not required

pull/493/merge
Nick O'Leary 2015-03-09 20:42:23 +00:00
parent 06bf710515
commit f6203fe60a
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ RED.editor = (function() {
} }
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) { if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
if (!value || value == "_ADD_") { if (!value || value == "_ADD_") {
valid = false; valid = definition[property].hasOwnProperty("required") && !definition[property].required;
} else { } else {
var v = RED.nodes.node(value).valid; var v = RED.nodes.node(value).valid;
valid = (v==null || v); valid = (v==null || v);