From c4f89fc40006d7ea82d58c3b9fff3fb4b427b5bd Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Sat, 25 May 2024 18:14:10 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20search=20crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Ruck --- democracy/desktop/src/components/molecules/ChartPair.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/democracy/desktop/src/components/molecules/ChartPair.tsx b/democracy/desktop/src/components/molecules/ChartPair.tsx index a4fbddb1..d3130866 100644 --- a/democracy/desktop/src/components/molecules/ChartPair.tsx +++ b/democracy/desktop/src/components/molecules/ChartPair.tsx @@ -102,10 +102,10 @@ export default function ChartPair({ item, className, large }) { partyVotes: item.voteResults.partyVotes.map((p: any) => ({ party: p.party, main: p.main.toLowerCase(), - yes: p.deviants.yes ?? 0, - no: p.deviants.no ?? 0, - abstination: p.deviants.abstination ?? 0, - notVoted: p.deviants.notVoted ?? 0, + yes: p.deviants?.yes ?? 0, + no: p.deviants?.no ?? 0, + abstination: p.deviants?.abstination ?? 0, + notVoted: p.deviants?.notVoted ?? 0, })), } : undefined;