Skip to content

Commit

Permalink
Fix crash when there are no more events this week
Browse files Browse the repository at this point in the history
The calendar started to cry when there were no more events
in the current week. Seems like a pretty reasonable thing
to be upset over i guess.
  • Loading branch information
foodelevator committed Feb 4, 2024
1 parent cee9789 commit 626ab24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/EventCalendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ export default function EventCalendar({ events, location, lang }) {
</div>
}
</div>
{(widgetWeekGroups
{(weekState.widgetIndex >= 0
&& widgetWeekGroups
&& widgetWeekGroups.length > 0
&& widgetWeekGroups[weekState.widgetIndex].week === weekState.week
&& widgetWeekGroups[weekState.widgetIndex].widgets.map((eventWidget, ei) => (
Expand Down

0 comments on commit 626ab24

Please sign in to comment.