From db1fa631b36753716bcc4e960e3f43f5472c5753 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Sun, 16 Aug 2015 21:08:11 -0400 Subject: [PATCH] Race condition. --- media/js/src/application.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/media/js/src/application.js b/media/js/src/application.js index 14fe23c..29e4458 100644 --- a/media/js/src/application.js +++ b/media/js/src/application.js @@ -37,14 +37,16 @@ jQuery(function($) { root.app = app; - if (root.location.pathname === '/account/stats/') { - root.ll('tagEvent', 'Viewed stats page'); - } - if (root.location.pathname === '/pro/') { - root.ll('tagEvent', 'Viewed Pro page'); - } - if (root.location.pathname === '/pro/signup/') { - root.ll('tagEvent', 'Viewed Pro signup page'); + if (root.ll) { + if (root.location.pathname === '/account/stats/') { + root.ll('tagEvent', 'Viewed stats page'); + } + if (root.location.pathname === '/pro/') { + root.ll('tagEvent', 'Viewed Pro page'); + } + if (root.location.pathname === '/pro/signup/') { + root.ll('tagEvent', 'Viewed Pro signup page'); + } } app.controller('AppController', function($scope) {