Skip to content

Commit

Permalink
Fix tabbing to align with 2-space-tab practices.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladay committed Dec 8, 2022
1 parent 02be788 commit 034d9b7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions app/controllers/errorPageController.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
core.controller("ErrorPageController", function ($scope, AccessControlService) {

$scope.getPath = function (path) {
$scope.getPath = function (path) {

if (!!path && path.length > 0) {
var paths = path.split('/');
if (!!path && path.length > 0) {
var paths = path.split('/');

for (var i in paths) {
// Return to top-level when previous path contains route variables.
if (paths[i][0] === ':') {
paths = [];
break;
}
for (var i in paths) {
// Return to top-level when previous path contains route variables.
if (paths[i][0] === ':') {
paths = [];
break;
}

return paths.join('/');
}

return path;
};
return paths.join('/');
}

return path;
};

// This is actually a URL path and not a route.
$scope.lastRoute = $scope.getPath(AccessControlService.getLastRoutePath());
// This is actually a URL path and not a route.
$scope.lastRoute = $scope.getPath(AccessControlService.getLastRoutePath());

});

0 comments on commit 034d9b7

Please sign in to comment.