diff --git a/stores/calendar-store.ts b/stores/calendar-store.ts index d05edc5e..33942a4e 100644 --- a/stores/calendar-store.ts +++ b/stores/calendar-store.ts @@ -622,7 +622,9 @@ export const useCalendarStore = create()( if (!calendar) throw new Error('Failed to create calendar'); const subscription: ICalSubscription = { - id: crypto.randomUUID(), + id: typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function' + ? crypto.randomUUID() + : `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`, url, calendarId: calendar.id, name,