From 26e74353f15dc2c52be32bbbc66f01414ad8a258 Mon Sep 17 00:00:00 2001 From: Reno Yang Date: Mon, 4 Nov 2024 00:29:33 +0100 Subject: [PATCH] type fix --- components/event/EventRegister/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/event/EventRegister/index.tsx b/components/event/EventRegister/index.tsx index 8b1e0347..35fe3297 100644 --- a/components/event/EventRegister/index.tsx +++ b/components/event/EventRegister/index.tsx @@ -94,7 +94,7 @@ const EventRegister: React.FC = ({ auth(); }*/ if (!nullifierHash) { - const zuPassInfo = event.regAndAccess.edges[0]?.node.zuPassInfo; + const zuPassInfo = event?.regAndAccess?.edges?.[0]?.node.zuPassInfo; const zuPassConfig = zuPassInfo && zuPassInfo.length > 0 ? { @@ -329,7 +329,7 @@ const EventRegister: React.FC = ({ } } } else if (ticketType === 'Zupass') { - const zuPassInfo = event.regAndAccess.edges[0]?.node.zuPassInfo; + const zuPassInfo = event?.regAndAccess?.edges?.[0]?.node.zuPassInfo; const zuPassConfig = zuPassInfo && zuPassInfo.length > 0 ? {