From a938105d27f69eb8b1a696914fa5ee44c4a46930 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:01:51 +0100 Subject: [PATCH] fix: add empty array as fallback for impact categories --- src/features/applications/components/ApplicationForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/applications/components/ApplicationForm.tsx b/src/features/applications/components/ApplicationForm.tsx index 2573d372..c7f6790f 100644 --- a/src/features/applications/components/ApplicationForm.tsx +++ b/src/features/applications/components/ApplicationForm.tsx @@ -42,7 +42,8 @@ const ImpactTags = (): JSX.Element => { control, }); - const selected = watch("application.impactCategory"); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + const selected = watch("application.impactCategory") ?? []; const error = formState.errors.application?.impactCategory; return (