From ea7d1ff6ed79bf6854647d2e84138fae204c00f4 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 7 May 2024 17:43:42 -0400 Subject: [PATCH] Handle error object for biometric lock (#9070) --- apps/browser/src/auth/popup/lock.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/auth/popup/lock.component.ts b/apps/browser/src/auth/popup/lock.component.ts index 86352e2c82..782e37b864 100644 --- a/apps/browser/src/auth/popup/lock.component.ts +++ b/apps/browser/src/auth/popup/lock.component.ts @@ -143,15 +143,17 @@ export class LockComponent extends BaseLockComponent { try { success = await super.unlockBiometric(); } catch (e) { - const error = BiometricErrors[e as BiometricErrorTypes]; + const error = BiometricErrors[e?.message as BiometricErrorTypes]; if (error == null) { this.logService.error("Unknown error: " + e); + return false; } this.biometricError = this.i18nService.t(error.description); + } finally { + this.pendingBiometric = false; } - this.pendingBiometric = false; return success; }