Permalink
Browse files

metrics.isReady is undefined if metrics are not enabled

  • Loading branch information...
1 parent 0d4f0b2 commit 2c3669ad9af32b51edaf2bdef5257e4673f355a4 @mkrecny mkrecny committed Mar 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/js/main.js
View
2 server/js/main.js
@@ -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;

0 comments on commit 2c3669a

Please sign in to comment.