Validate functions should be called in context of the node

This commit is contained in:
Nicholas O'Leary 2013-09-17 13:22:38 +01:00
parent d3ed9afe03
commit 1d4adecaa0
1 changed files with 1 additions and 1 deletions

View File

@ -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_");