mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 09:18:48 -03:30
fixed the null error for the org add user breadcrumbs
This commit is contained in:
@@ -303,25 +303,28 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
|||||||
child = child.charAt(0).toUpperCase() + child.slice(1);
|
child = child.charAt(0).toUpperCase() + child.slice(1);
|
||||||
// find the correct title
|
// find the correct title
|
||||||
found = false;
|
found = false;
|
||||||
for (j = 0; j < $rootScope.crumbCache.length; j++) {
|
if ($rootScope.crumbCache) {
|
||||||
if ($rootScope.crumbCache[j].path === '/' + parent + '/' + paths[i]) {
|
for (j = 0; j < $rootScope.crumbCache.length; j++) {
|
||||||
child = $rootScope.crumbCache[j].title;
|
if ($rootScope.crumbCache[j].path === '/' + parent + '/' + paths[i]) {
|
||||||
found = true;
|
child = $rootScope.crumbCache[j].title;
|
||||||
break;
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (found && $rootScope.crumbCache[j].altPath !== undefined) {
|
||||||
|
// Use altPath to override default path construction
|
||||||
|
$rootScope.breadcrumbs.push({
|
||||||
|
title: child,
|
||||||
|
path: $rootScope.crumbCache[j].altPath
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$rootScope.breadcrumbs.push({
|
||||||
|
title: child,
|
||||||
|
path: ppath + '/' + paths[i]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (found && $rootScope.crumbCache[j].altPath !== undefined) {
|
|
||||||
// Use altPath to override default path construction
|
|
||||||
$rootScope.breadcrumbs.push({
|
|
||||||
title: child,
|
|
||||||
path: $rootScope.crumbCache[j].altPath
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$rootScope.breadcrumbs.push({
|
|
||||||
title: child,
|
|
||||||
path: ppath + '/' + paths[i]
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//if (/_/.test(paths[i])) {
|
//if (/_/.test(paths[i])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user