Fondation

This commit is contained in:
alma 2026-01-17 02:32:29 +01:00
parent 6c77a33c6f
commit b1dacb71cb

View File

@ -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) {