correctly check if ga is defined

This commit is contained in:
Athou
2013-04-25 12:54:32 +02:00
parent effa009241
commit 7912e1e098

View File

@@ -2,7 +2,7 @@ var module = angular.module('commafeed.services', [ 'ngResource' ]);
module.service('AnalyticsService', [ '$state', function($state) {
this.track = function(path) {
if (!ga) {
if (typeof variable === 'undefined') {
return;
}
path = path || $state.$current.url.prefix;