fix: accept legacy dynamic sections
This commit is contained in:
1 parent
65e866064e
commit
2645cb426a
2 files changed
+15
-3
No files matched your search
@@ -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]);
|
||||
Reference in new issue
Block a user