From a5cf4b17bfd85bcaf70daca401ba903089ace5bc Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 9 May 2014 15:23:33 +0100 Subject: [PATCH] New config nodes not picking up defaults --- public/red/ui/editor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index 2681c7c04..c4ea36dc2 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -377,6 +377,11 @@ RED.editor = function() { _def: node_def, type: type } + for (var d in node_def.defaults) { + if (node_def.defaults[d].value) { + configNode[d] = node_def.defaults[d].value; + } + } } $("#dialog-config-form").html($("script[data-template-name='"+type+"']").html());