From a3b6d7f42504940d13f79d481a51b2b791f9828b Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 24 Mar 2026 13:41:32 -0700 Subject: [PATCH] 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 --- modules/rcal/mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rcal/mod.ts b/modules/rcal/mod.ts index a4f598b..7227843 100644 --- a/modules/rcal/mod.ts +++ b/modules/rcal/mod.ts @@ -92,7 +92,7 @@ function eventToRow(ev: CalendarEvent, sources: Record) 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, })); }