Fix NPE if the current route is null

This commit is contained in:
Joseph Schorr 2014-04-29 23:48:06 -04:00
parent fe665118bb
commit b9bcc99663

View file

@ -4791,6 +4791,10 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
});
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
$rootScope.current = current.$$route;
if (!current.$$route) { return; }
if (current.$$route.title) {
$rootScope.title = current.$$route.title;
}
@ -4802,7 +4806,6 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
}
$rootScope.fixFooter = !!current.$$route.fixFooter;
$rootScope.current = current.$$route;
});
$rootScope.$on('$viewContentLoaded', function(event, current) {