Fix NPE if the current route is null
This commit is contained in:
parent
fe665118bb
commit
b9bcc99663
1 changed files with 4 additions and 1 deletions
|
@ -4791,6 +4791,10 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
||||||
|
$rootScope.current = current.$$route;
|
||||||
|
|
||||||
|
if (!current.$$route) { return; }
|
||||||
|
|
||||||
if (current.$$route.title) {
|
if (current.$$route.title) {
|
||||||
$rootScope.title = 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.fixFooter = !!current.$$route.fixFooter;
|
||||||
$rootScope.current = current.$$route;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('$viewContentLoaded', function(event, current) {
|
$rootScope.$on('$viewContentLoaded', function(event, current) {
|
||||||
|
|
Reference in a new issue