[SG-279] Fix unlock button not working after logging in through SSO (#1672)

This commit is contained in:
Oscar Hinton 2022-05-12 16:21:50 +02:00 committed by GitHub
parent 3367736c7e
commit f4f3e8c574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ export class LockComponent extends BaseLockComponent {
await super.ngOnInit(); await super.ngOnInit();
this.onSuccessfulSubmit = async () => { this.onSuccessfulSubmit = async () => {
const previousUrl = this.routerService.getPreviousUrl(); const previousUrl = this.routerService.getPreviousUrl();
if (previousUrl !== "/" && previousUrl.indexOf("lock") === -1) { if (previousUrl && previousUrl !== "/" && previousUrl.indexOf("lock") === -1) {
this.successRoute = previousUrl; this.successRoute = previousUrl;
} }
this.router.navigateByUrl(this.successRoute); this.router.navigateByUrl(this.successRoute);