Skip to content

Commit

Permalink
Use shorter variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 10, 2024
1 parent 9b37e8e commit 4bf3254
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,16 @@ export class AuthService {
* Redirect back to the original page after login
*/
redirectAfterLogin() {
let afterLogin = sessionStorage.getItem('afterLogin');
let path = sessionStorage.getItem('afterLogin');
sessionStorage.removeItem('afterLogin');
if (
!afterLogin ||
['/oauth/callback', '/register', '/setup-totp', '/confirm-totp'].some((path) =>
afterLogin!.startsWith(path),
!path ||
['/oauth/callback', '/register', '/setup-totp', '/confirm-totp'].some((p) =>
path!.startsWith(p),
)
) {
afterLogin = '/';
path = '/';
}
this.#router.navigate([afterLogin]);
this.#router.navigate([path]);
}
}

0 comments on commit 4bf3254

Please sign in to comment.