From 3efdff6ca44711fc542aca3f2010a5267a6f6fa6 Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Fri, 16 Jan 2015 21:03:25 -0800 Subject: [PATCH] Fix bug where GA being slow to load caused crash --- src/scripts/crafting_guide_router.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/crafting_guide_router.coffee b/src/scripts/crafting_guide_router.coffee index 5a6dccca0..54810d08a 100644 --- a/src/scripts/crafting_guide_router.coffee +++ b/src/scripts/crafting_guide_router.coffee @@ -49,7 +49,7 @@ module.exports = class CraftingGuideRouter extends Backbone.Router return if @_lastReported is pathname @_lastReported = pathname - if global.env is 'production' + if global.env is 'production' and ga? logger.info "Recording GA page view: #{pathname}" ga 'send', 'pageview', pathname else