2
0

🚑 Properly preprocess typebot version

This commit is contained in:
Baptiste Arnaud
2023-08-24 09:29:32 +02:00
parent 06ecdf040e
commit 793218a673

View File

@@ -5,6 +5,7 @@ export const preprocessTypebot = (typebot: any) => {
if (!typebot || typebot.version === '5') return typebot
return {
...typebot,
version: typebot.version === undefined ? null : typebot.version,
groups: typebot.groups ? typebot.groups.map(preprocessGroup) : [],
edges: typebot.edges
? typebot.edges?.filter((edge: any) => edgeSchema.safeParse(edge).success)