Skip to content

Commit

Permalink
type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
renoyang66 committed Nov 3, 2024
1 parent 3950176 commit 26e7435
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/event/EventRegister/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const EventRegister: React.FC<EventRegisterProps> = ({
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
? {
Expand Down Expand Up @@ -329,7 +329,7 @@ const EventRegister: React.FC<EventRegisterProps> = ({
}
}
} 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
? {
Expand Down

0 comments on commit 26e7435

Please sign in to comment.