Refactor: require trigger in all events objects (#1636)

* reqire trigger in all events

* use structuredClone when cloning an event
This commit is contained in:
Alex Christoffer Rasmussen
2025-06-12 09:54:57 +02:00
committed by GitHub
parent 02c30c9681
commit 2a5b053d97
7 changed files with 31 additions and 5 deletions
+2 -1
View File
@@ -30,6 +30,7 @@ export const cloneEvent = (event: OntimeEvent): ClonedEvent => {
gap: 0,
timeWarning: event.timeWarning,
timeDanger: event.timeDanger,
custom: { ...event.custom },
triggers: structuredClone(event.triggers),
custom: structuredClone(event.custom),
};
};