1
0
mirror of https://github.com/bitwarden/web synced 2025-12-15 15:53:18 +00:00

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

(cherry picked from commit f4f3e8c574)
This commit is contained in:
Oscar Hinton
2022-05-12 16:21:50 +02:00
committed by Hinton
parent 466e0c8c35
commit 02256aad87

View File

@@ -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);