From 7f08550fd1d7103c98b3077a017db50681df2e43 Mon Sep 17 00:00:00 2001 From: rohan-chaturvedi Date: Mon, 9 Oct 2023 12:55:35 +0530 Subject: [PATCH] fix: handle no secret history for new secret --- frontend/components/environments/SecretRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/environments/SecretRow.tsx b/frontend/components/environments/SecretRow.tsx index 66fa97d4..6bb5b662 100644 --- a/frontend/components/environments/SecretRow.tsx +++ b/frontend/components/environments/SecretRow.tsx @@ -261,7 +261,7 @@ const HistoryDialog = (props: { secret: SecretType }) => { if (eventType === ApiSecretEventEventTypeChoices.D) return 'Deleted' } - const secretHistory = secret.history!.filter( + const secretHistory = secret.history?.filter( (event: Maybe) => event?.eventType! !== ApiSecretEventEventTypeChoices.R )