From fa8e5ea4685b97f7a0e0a39aa9ec73ea48db9808 Mon Sep 17 00:00:00 2001 From: Dennis Heaney Date: Fri, 30 Jan 2015 22:48:17 +0000 Subject: [PATCH] Fixes #53 - js error if _spoor is not set in config.json --- js/adapt-contrib-spoor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/adapt-contrib-spoor.js b/js/adapt-contrib-spoor.js index 12e70bb0..4fd82598 100644 --- a/js/adapt-contrib-spoor.js +++ b/js/adapt-contrib-spoor.js @@ -22,7 +22,7 @@ define(function(require) { initialize: function() { this.data = Adapt.config.get('_spoor'); - if (this.data._isEnabled === false) return; + if (!this.data || this.data._isEnabled === false) return; this.SCOStart() ; $(window).unload(_.bind(this.SCOFinish, this)); this.onDataReady(); @@ -138,4 +138,4 @@ define(function(require) { Adapt.on('app:dataReady', function() { new Spoor(); }); -}); \ No newline at end of file +});