From ceb2ef49ae36af3c0cf5a5f6eedd56b38ab7a27a Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 25 Feb 2016 23:57:31 -0500 Subject: [PATCH] fix JS bug --- resources/views/server/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php index ff2e6280f..04bf07450 100644 --- a/resources/views/server/index.blade.php +++ b/resources/views/server/index.blade.php @@ -277,7 +277,7 @@ $(window).load(function () { $('#players_notice').hide(); $('#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(''); $.each(data['data'].players, function(id, d) { $('#toggle_players').append('' + d.name + ',');