diff --git a/shared/modules/dashboard/dashboard.service.ts b/shared/modules/dashboard/dashboard.service.ts index 1601373..ede2374 100644 --- a/shared/modules/dashboard/dashboard.service.ts +++ b/shared/modules/dashboard/dashboard.service.ts @@ -141,7 +141,9 @@ export const dashboardService = { const { systemEvents, EVENTS } = await import("@shared/lib/events"); systemEvents.emit(EVENTS.DASHBOARD.NEW_EVENT, { ...fullEvent, - timestamp: (fullEvent.timestamp as Date).toISOString() + timestamp: (fullEvent.timestamp instanceof Date) + ? fullEvent.timestamp.toISOString() + : fullEvent.timestamp }); } catch (e) { console.error("Failed to emit system event:", e);