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

Allow a config-node be marked as not required

This commit is contained in:
Nick O'Leary 2015-03-09 20:42:23 +00:00
parent 06bf710515
commit f6203fe60a

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 (!value || value == "_ADD_") {
valid = false;
valid = definition[property].hasOwnProperty("required") && !definition[property].required;
} else {
var v = RED.nodes.node(value).valid;
valid = (v==null || v);