Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
🚑 Fix bug causing crash if logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
danieladugyan committed Sep 7, 2023
1 parent f78c7af commit e732636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/components/Calendar/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ export default function EventCard({
{event.organizer}
</Typography>

{(hasAccess(apiContext, 'event:update') || event.author?.id === user.id) && (
<Link href={routes.editEvent(event.id)}>{t('edit')}</Link>
{(hasAccess(apiContext, 'event:update') || event.author?.id === user?.id) && (
<Link href={routes.editEvent(event.id)}>{t('edit')}</Link>
)}
</Stack>
);
Expand Down

0 comments on commit e732636

Please sign in to comment.