Fixed voting validation issue

This commit is contained in:
Brian Buller 2017-07-09 20:19:15 -05:00
parent cd42e7ab91
commit a10bfd175e
1 changed files with 4 additions and 2 deletions

View File

@ -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;