Skip to content

Commit

Permalink
metrics.isReady is undefined if metrics are not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrecny committed Mar 27, 2012
1 parent 0d4f0b2 commit 2c3669a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/js/main.js
Expand Up @@ -13,7 +13,7 @@ function main(config) {
worlds = [],
lastTotalPlayers = 0,
checkPopulationInterval = setInterval(function() {
if(metrics.isReady) {
if(metrics && metrics.isReady) {
metrics.getTotalPlayers(function(totalPlayers) {
if(totalPlayers !== lastTotalPlayers) {
lastTotalPlayers = totalPlayers;
Expand Down

0 comments on commit 2c3669a

Please sign in to comment.