fix: accept legacy dynamic sections

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:07:07 +02:00
1 parent 65e866064e
commit 2645cb426a
2 files changed
+15 -3

No files matched your search

+5 -1
View File
@@ -93,4 +93,8 @@ const containerSectionSchema = z.object({
),
});
export const sectionSchema = z.union([emptySectionSchema, containerSectionSchema]);
const legacyDynamicSectionSchema = containerSectionSchema
.extend({ kind: z.literal("dynamic") })
.transform((section) => ({ ...section, kind: "container" as const }));
export const sectionSchema = z.union([emptySectionSchema, containerSectionSchema, legacyDynamicSectionSchema]);