From 7fc9fb606a8f6c73eb2827f51baef8294db4bb4f Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Mon, 15 Jun 2015 08:00:53 -0400
Subject: fixes mm-1223 gracefully handle missing analytics configs

---
 web/react/utils/client.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'web/react/utils/client.jsx')

diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index b83ee22e7..701d3d25b 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -4,16 +4,16 @@
 
 module.exports.track = function(category, action, label, prop, val) {
     global.window.snowplow('trackStructEvent', category, action, label, prop, val);
-    if (global.window.analytics != null) global.window.analytics.track(action, {category: category, label: label, property: prop, value: val});
+    global.window.analytics.track(action, {category: category, label: label, property: prop, value: val});
 };
 
 module.exports.trackPage = function() {
     global.window.snowplow('trackPageView');
-    if (global.window.analytics != null) global.window.analytics.page();
+    global.window.analytics.page();
 };
 
 function handleError(method_name, xhr, status, err) {
-    var _LTracker = global.window._LTracker || [];
+    var _LTracker = global.window._LTracker;
 
     var e = null;
     try {
-- 
cgit v1.2.3-1-g7c22

