fix(db-sync): runtime type error

This commit is contained in:
Emir Karabeg
2025-03-03 21:04:42 -08:00
parent 9825e46732
commit 3b28f7c653
+4 -1
View File
@@ -12,7 +12,10 @@ const WorkflowStateSchema = z.object({
loops: z.record(z.any()),
lastSaved: z.number().optional(),
isDeployed: z.boolean().optional(),
deployedAt: z.date().optional(),
deployedAt: z
.union([z.string(), z.date()])
.optional()
.transform((val) => (typeof val === 'string' ? new Date(val) : val)),
})
const WorkflowSchema = z.object({