mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-21 02:11:54 +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 */
|
/** Opens the view dialog for the given cipher unless password reprompt fails */
|
||||||
async viewCipherById(cipher: CipherView) {
|
async viewCipherById(cipher: CipherView) {
|
||||||
|
if (!cipher) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
cipher &&
|
cipher &&
|
||||||
cipher.reprompt !== 0 &&
|
cipher.reprompt !== 0 &&
|
||||||
@ -890,7 +894,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
|
const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
|
||||||
"edit",
|
"edit",
|
||||||
cipher.id as CipherId,
|
cipher.id as CipherId,
|
||||||
cipher?.type,
|
cipher.type,
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.openVaultItemDialog("view", cipherFormConfig, cipher);
|
await this.openVaultItemDialog("view", cipherFormConfig, cipher);
|
||||||
|
Loading…
Reference in New Issue
Block a user