From a10bfd175ea7c2b66b4f686f4befea878bb64353 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Sun, 9 Jul 2017 20:19:15 -0500 Subject: [PATCH] Fixed voting validation issue --- templates/public-voting.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/public-voting.html b/templates/public-voting.html index 54253b6..b586bc9 100644 --- a/templates/public-voting.html +++ b/templates/public-voting.html @@ -268,9 +268,11 @@ function getRanked() { function gameTableToArray(tbl) { var ret = []; var trs = snack.wrap('#'+tbl+'-table>tbody>tr') - if(trs[0].length > 0) { + if(trs.length > 0) { trs.each(function(ele, idx) { - ret = ret.concat(getTeamObj(ele.dataset.teamid)); + if(ele.dataset != null && ele.dataset.teamid != null) { + ret = ret.concat(getTeamObj(ele.dataset.teamid)); + } }); } return ret;