mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
pass actual redirect when no state (#3285)
This commit is contained in:
committed by
Denys Vuika
parent
4fbacf4860
commit
f63614e964
@@ -63,6 +63,11 @@ export class AuthGuard implements CanActivate, CanActivateChild {
|
||||
private getNavigationCommands(redirectUrl: string): any[] {
|
||||
const urlTree: UrlTree = this.router.parseUrl(redirectUrl);
|
||||
const urlSegmentGroup: UrlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
|
||||
|
||||
if (!urlSegmentGroup) {
|
||||
return [redirectUrl];
|
||||
}
|
||||
|
||||
const urlSegments: UrlSegment[] = urlSegmentGroup.segments;
|
||||
|
||||
return urlSegments.reduce(function(acc, item) {
|
||||
|
Reference in New Issue
Block a user