fixed console error for undefined name on object due to being logged out

This commit is contained in:
John Mitchell 2015-07-23 02:59:56 -04:00
parent 56e8dbba9c
commit f4ac835845

View File

@ -1050,8 +1050,9 @@ var tower = angular.module('Tower', [
$rootScope.$on("$routeChangeStart", function (event, next, prev) {
// this line removes the query params attached to a route
if(prev.$$route.name === 'systemTracking'){
$location.replace($location.search('').$$url);
if(prev && prev.$$route &&
prev.$$route.name === 'systemTracking'){
$location.replace($location.search('').$$url);
}
// Before navigating away from current tab, make sure the primary view is visible