fix(rcal): convert Automerge proxy arrays to plain arrays for tags serialization
Automerge proxy lists don't serialize to JSON properly via ?? null. Use Array.from() to materialize them before returning in API responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2dd5e764cd
commit
a3b6d7f425
|
|
@ -92,7 +92,7 @@ function eventToRow(ev: CalendarEvent, sources: Record<string, CalendarSource>)
|
|||
virtual_platform: ev.virtualPlatform,
|
||||
r_tool_source: ev.rToolSource,
|
||||
r_tool_entity_id: ev.rToolEntityId,
|
||||
tags: ev.tags ?? null,
|
||||
tags: ev.tags ? Array.from(ev.tags) : null,
|
||||
attendees: ev.attendees,
|
||||
attendee_count: ev.attendeeCount,
|
||||
metadata: ev.metadata,
|
||||
|
|
@ -1027,7 +1027,7 @@ export function getUpcomingEventsForMI(space: string, days = 14, limit = 5): MIC
|
|||
allDay: e.allDay,
|
||||
location: e.locationName || null,
|
||||
isVirtual: e.isVirtual,
|
||||
tags: e.tags ?? null,
|
||||
tags: e.tags ? Array.from(e.tags) : null,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue