Fondation
This commit is contained in:
parent
6c77a33c6f
commit
b1dacb71cb
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user