From cefa0ae5b623bdf761bac2066465977fddb7b160 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 28 Mar 2014 21:00:11 +0000 Subject: [PATCH] Node defaults of 0 not showing in edit form Fixes #186 --- public/red/ui/editor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index 63d3899c6..3315d934a 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -55,7 +55,11 @@ RED.editor = function() { if (input.attr('type') === "checkbox") { input.prop('checked',node[d]); } else { - input.val(node[d]||""); + var val = node[d]; + if (node[d] == null) { + val = ""; + } + input.val(val); } } $("#node-input-"+d).change(function() {