Node defaults of 0 not showing in edit form

Fixes #186
This commit is contained in:
Nick O'Leary 2014-03-28 21:00:11 +00:00
parent 79f8d057a1
commit cefa0ae5b6
1 changed files with 5 additions and 1 deletions

View File

@ -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() {