fix JS bug
This commit is contained in:
parent
82a43bbf15
commit
ceb2ef49ae
|
@ -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>,');
|
||||||
|
|
Loading…
Reference in New Issue