diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-26 22:53:12 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-26 22:59:46 -1000 |
commit | f7500c061f257feca2bccf3c51616110589cfa0e (patch) | |
tree | 155d463ffd040ba38aa7f4dd3d112009e3159cf9 | |
parent | 21cb78e192601e115a9cf906b799d6696074a32f (diff) | |
download | patchfoo-f7500c061f257feca2bccf3c51616110589cfa0e.tar.gz patchfoo-f7500c061f257feca2bccf3c51616110589cfa0e.zip |
Don't set empty vote root/branch
-rw-r--r-- | lib/render-msg.js | 4 |
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})] } |