mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Validate functions should be called in context of the node
This commit is contained in:
parent
d3ed9afe03
commit
1d4adecaa0
@ -96,7 +96,7 @@ RED.editor = function() {
|
||||
valid = value !== "";
|
||||
}
|
||||
if (valid && "validate" in node._def.defaults[property]) {
|
||||
valid = node._def.defaults[property].validate(value);
|
||||
valid = node._def.defaults[property].validate.call(node,value);
|
||||
}
|
||||
if (valid && node._def.defaults[property].type && RED.nodes.getType(node._def.defaults[property].type)) {
|
||||
valid = (value != "_ADD_");
|
||||
|
Loading…
Reference in New Issue
Block a user