mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[PM-14445] TS strict for Key Management, Keys and Lock component (#13121)
* PM-14445: TS strict for Key Management Biometrics * formatting * callbacks not null expectations * state nullability expectations updates * unit tests fix * secure channel naming, explicit null check on messageId * KM-14445: TS strict for Key Management, Keys and Lock component * conflicts resolution, new strict check failures * null simplifications * migrate legacy encryption when no active user throw error instead of hiding it * throw instead of return
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { inject } from "@angular/core";
|
||||
import { combineLatest, defer, firstValueFrom, map, Observable } from "rxjs";
|
||||
|
||||
@@ -26,7 +24,7 @@ export class ExtensionLockComponentService implements LockComponentService {
|
||||
private readonly biometricStateService = inject(BiometricStateService);
|
||||
|
||||
getPreviousUrl(): string | null {
|
||||
return this.routerService.getPreviousUrl();
|
||||
return this.routerService.getPreviousUrl() ?? null;
|
||||
}
|
||||
|
||||
getBiometricsError(error: any): string | null {
|
||||
@@ -71,7 +69,7 @@ export class ExtensionLockComponentService implements LockComponentService {
|
||||
map(([biometricsStatus, userDecryptionOptions, pinDecryptionAvailable]) => {
|
||||
const unlockOpts: UnlockOptions = {
|
||||
masterPassword: {
|
||||
enabled: userDecryptionOptions.hasMasterPassword,
|
||||
enabled: userDecryptionOptions?.hasMasterPassword,
|
||||
},
|
||||
pin: {
|
||||
enabled: pinDecryptionAvailable,
|
||||
|
||||
Reference in New Issue
Block a user