diff --git a/packages/lib/CalendarService.ts b/packages/lib/CalendarService.ts index b2f6676833..5a310cd72f 100644 --- a/packages/lib/CalendarService.ts +++ b/packages/lib/CalendarService.ts @@ -337,7 +337,7 @@ export default abstract class BaseCalendarService implements Calendar { const userTimeZone = userId ? await this.getUserTimezoneFromDB(userId) : "Europe/London"; const events: { start: string; end: string }[] = []; objects.forEach((object) => { - if (object.data == null || JSON.stringify(object.data) == "{}") return; + if (!object || object.data == null || JSON.stringify(object.data) == "{}") return; let vcalendar: ICAL.Component; try { const jcalData = ICAL.parse(sanitizeCalendarObject(object));