Skip to content

Commit 5fc6f97

Browse files
authored
fix: handle the potential absence of events (#7091)
* fix: handle the potential absence of events * chore: move logic to getCalendarEvents
1 parent 716856f commit 5fc6f97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/site/next.calendar.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ export const getCalendarEvents = async (calendarId = '', maxResults = 20) => {
3535

3636
return fetch(calendarQueryUrl.toString())
3737
.then(response => response.json())
38-
.then(calendar => calendar.items);
38+
.then(calendar => calendar.items ?? []);
3939
};

0 commit comments

Comments
 (0)