don't append empty textareas

This commit is contained in:
Manuel Friedli 2015-03-25 20:28:54 +01:00
parent 0996aee7a7
commit 68b59b0370

View file

@ -107,8 +107,10 @@
output = "internal error. Sorry."; output = "internal error. Sorry.";
} }
if (appendNewOutput) { if (appendNewOutput) {
$output = $(template.replace(/\{index\}/g, "" + outputIndex).replace(/\{content\}/g, output)); if (output !== "") {
$("body").append($output); $output = $(template.replace(/\{index\}/g, "" + outputIndex).replace(/\{content\}/g, output));
$("body").append($output);
}
} else { } else {
$output.val(output); $output.val(output);
update($output); update($output);