From f4f3e8c5744c07e0bf50c30afb6dac1c6e51c962 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 12 May 2022 16:21:50 +0200 Subject: [PATCH] [SG-279] Fix unlock button not working after logging in through SSO (#1672) --- src/app/accounts/lock.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/accounts/lock.component.ts b/src/app/accounts/lock.component.ts index 4b8a0d4b42f..791481003c8 100644 --- a/src/app/accounts/lock.component.ts +++ b/src/app/accounts/lock.component.ts @@ -55,7 +55,7 @@ export class LockComponent extends BaseLockComponent { await super.ngOnInit(); this.onSuccessfulSubmit = async () => { const previousUrl = this.routerService.getPreviousUrl(); - if (previousUrl !== "/" && previousUrl.indexOf("lock") === -1) { + if (previousUrl && previousUrl !== "/" && previousUrl.indexOf("lock") === -1) { this.successRoute = previousUrl; } this.router.navigateByUrl(this.successRoute);