Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
[fix] Fix merge issue
Browse files Browse the repository at this point in the history
I used createUrlTree when merging guards because I knew that was the angular standard, didn't notice that redirect was a helper method from us
  • Loading branch information
addisonbeck committed May 3, 2022
1 parent 5bdf7dd commit f83e26b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions angular/src/guards/auth.guard.ts
Expand Up @@ -31,14 +31,14 @@ export class AuthGuard extends BaseGuard implements CanActivate {
if (routerState != null) {
this.messagingService.send("lockedUrl", { url: routerState.url });
}
return this.router.createUrlTree(["lock"], { queryParams: { promptBiometric: true } });
return this.redirect("lock", { queryParams: { promptBiometric: true } });
}

if (
!routerState.url.includes("remove-password") &&
(await this.keyConnectorService.getConvertAccountRequired())
) {
return this.router.createUrlTree(["/remove-password"]);
return this.redirect("/remove-password");
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions angular/src/guards/unauth.guard.ts
Expand Up @@ -21,9 +21,9 @@ export class UnauthGuard extends BaseGuard implements CanActivate {
}

if (authStatus === AuthenticationStatus.Locked) {
return this.router.createUrlTree(["lock"]);
return this.redirect("lock");
}

return this.router.createUrlTree([this.homepage]);
return this.redirect(this.homepage);
}
}

0 comments on commit f83e26b

Please sign in to comment.