From f7500c061f257feca2bccf3c51616110589cfa0e Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 26 Nov 2018 22:53:12 -1000 Subject: Don't set empty vote root/branch --- lib/render-msg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/render-msg.js') 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})] } -- cgit v1.2.3