From 1d4adecaa04362d038cab1345d4750409728313a Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Tue, 17 Sep 2013 13:22:38 +0100 Subject: [PATCH] Validate functions should be called in context of the node --- public/red/ui/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index 40deb4feb..fc85f58cc 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -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_");