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 ? {