aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-26 22:53:12 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-26 22:59:46 -1000
commitf7500c061f257feca2bccf3c51616110589cfa0e (patch)
tree155d463ffd040ba38aa7f4dd3d112009e3159cf9 /lib/render-msg.js
parent21cb78e192601e115a9cf906b799d6696074a32f (diff)
downloadpatchfoo-f7500c061f257feca2bccf3c51616110589cfa0e.tar.gz
patchfoo-f7500c061f257feca2bccf3c51616110589cfa0e.zip
Don't set empty vote root/branch
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})]
}