From 1c43402601b35eaa7ba92f5d1212bdeb1d71e4c3 Mon Sep 17 00:00:00 2001 From: Alec Rippberger <127791530+alec-livefront@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:09:20 -0500 Subject: [PATCH] Check result is not null or undefined before trying to access the action property. (#10754) --- apps/web/src/app/vault/individual-vault/vault.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index de945d52242..d47a8be2523 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -718,12 +718,12 @@ export class VaultComponent implements OnInit, OnDestroy { const result: ViewCipherDialogCloseResult = await lastValueFrom(dialogRef.closed); // If the dialog was closed by deleting the cipher, refresh the vault. - if (result.action === ViewCipherDialogResult.deleted) { + if (result?.action === ViewCipherDialogResult.deleted) { this.refresh(); } // If the dialog was closed by any other action (close button, escape key, etc), navigate back to the vault. - if (!result.action) { + if (!result?.action) { this.go({ cipherId: null, itemId: null, action: null }); } }