fix JS bug

This commit is contained in:
Dane Everitt 2016-02-25 23:57:31 -05:00
parent 82a43bbf15
commit ceb2ef49ae
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ $(window).load(function () {
$('#players_notice').hide(); $('#players_notice').hide();
$('#toggle_players').show(); $('#toggle_players').show();
} }
if(data['data'].players != undefined && data['data'].players.length !== 0){ if(typeof data['data'] !== 'undefined' && typeof data['data'].players !== 'undefined' && data['data'].players.length !== 0){
$('#toggle_players').html(''); $('#toggle_players').html('');
$.each(data['data'].players, function(id, d) { $.each(data['data'].players, function(id, d) {
$('#toggle_players').append('<code>' + d.name + '</code>,'); $('#toggle_players').append('<code>' + d.name + '</code>,');