From e6cbe7156ed62bcc198a6e68485125a70e38a772 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 27 Oct 2022 12:49:59 +0200 Subject: [PATCH] [PS-1646] Resolve biometrics auto prompt not working (#3815) --- apps/desktop/src/app/accounts/lock.component.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/desktop/src/app/accounts/lock.component.ts b/apps/desktop/src/app/accounts/lock.component.ts index 5cb28802796..433bd79172e 100644 --- a/apps/desktop/src/app/accounts/lock.component.ts +++ b/apps/desktop/src/app/accounts/lock.component.ts @@ -65,13 +65,15 @@ export class LockComponent extends BaseLockComponent { // eslint-disable-next-line rxjs-angular/prefer-takeuntil this.route.queryParams.subscribe((params) => { - if (this.supportsBiometric && params.promptBiometric && autoPromptBiometric) { - setTimeout(async () => { - if (await ipcRenderer.invoke("windowVisible")) { - this.unlockBiometric(); - } - }, 1000); - } + setTimeout(async () => { + if (!params.promptBiometric || !this.supportsBiometric || !autoPromptBiometric) { + return; + } + + if (await ipcRenderer.invoke("windowVisible")) { + this.unlockBiometric(); + } + }, 1000); }); this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => { this.ngZone.run(() => {