1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

add null check for cipher when attempting to view

This commit is contained in:
Nick Krantz
2024-10-04 13:12:07 -05:00
parent 87ff20af2c
commit caa3b46f50

View File

@@ -877,6 +877,10 @@ export class VaultComponent implements OnInit, OnDestroy {
/** Opens the view dialog for the given cipher unless password reprompt fails */
async viewCipherById(cipher: CipherView) {
if (!cipher) {
return;
}
if (
cipher &&
cipher.reprompt !== 0 &&
@@ -890,7 +894,7 @@ export class VaultComponent implements OnInit, OnDestroy {
const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
"edit",
cipher.id as CipherId,
cipher?.type,
cipher.type,
);
await this.openVaultItemDialog("view", cipherFormConfig, cipher);