mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-16 01:21:48 +01:00
add null check for cipher when attempting to view
This commit is contained in:
parent
87ff20af2c
commit
caa3b46f50
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user