From 894fc43f836f2c6263bc883c88cedf3f15887491 Mon Sep 17 00:00:00 2001 From: Quang Son Le Date: Fri, 3 Jan 2025 10:01:44 +0100 Subject: [PATCH] POLIO-1810: make check on grouped campaigns null safe --- .../polio/js/src/domains/Campaigns/CampaignsList/Dashboard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/polio/js/src/domains/Campaigns/CampaignsList/Dashboard.tsx b/plugins/polio/js/src/domains/Campaigns/CampaignsList/Dashboard.tsx index 95a3de8a5b..8294a7c582 100644 --- a/plugins/polio/js/src/domains/Campaigns/CampaignsList/Dashboard.tsx +++ b/plugins/polio/js/src/domains/Campaigns/CampaignsList/Dashboard.tsx @@ -44,7 +44,7 @@ export const Dashboard: FunctionComponent = () => { campaigns: rawCampaigns.campaigns.map(campaign => ({ ...campaign, grouped_campaigns: - campaign.grouped_campaigns.length > 0 + (campaign.grouped_campaigns?.length ?? 0) > 0 ? campaign.grouped_campaigns : null, })),