From b1dacb71cb9f7f2e607e680d7cf67f5c4a0e4be6 Mon Sep 17 00:00:00 2001 From: alma Date: Sat, 17 Jan 2026 02:32:29 +0100 Subject: [PATCH] Fondation --- lib/services/caldav-sync.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/services/caldav-sync.ts b/lib/services/caldav-sync.ts index 48c2648..acd5233 100644 --- a/lib/services/caldav-sync.ts +++ b/lib/services/caldav-sync.ts @@ -230,12 +230,14 @@ export async function fetchCalDAVEvents( }); // Validate response data exists - if (!response.data || typeof response.data !== 'string') { - throw new Error(`Invalid response from CalDAV server: expected string data, got ${typeof response.data}`); + // Handle both Response and ResponseDataDetailed types + const responseData = (response as any).data || ''; + if (!responseData || typeof responseData !== 'string') { + throw new Error(`Invalid response from CalDAV server: expected string data, got ${typeof responseData}`); } // Parse iCalendar data from response - const events = parseICalendarEvents(response.data); + const events = parseICalendarEvents(responseData); return events; } catch (error) {