aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 474d3e9..2f7216a 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -234,8 +234,8 @@ RenderMsg.prototype.voteButton = function (expression) {
return [
h('input', {type: 'hidden', name: 'vote_value', value: 1}),
h('input', {type: 'hidden', name: 'vote_expression', value: expression}),
- h('input', {type: 'hidden', name: 'root', value: root}),
- h('input', {type: 'hidden', name: 'branches', value: branches.join(',')}),
+ root ? h('input', {type: 'hidden', name: 'root', value: root}) : '',
+ branches.length ? h('input', {type: 'hidden', name: 'branches', value: branches.join(',')}) : '',
h('input', {type: 'submit', name: 'action_vote', value: expression})]
}