Merged in fix/nullable-two_column_list (pull request #686)

fix: fields from Contentstack can be null.

Approved-by: Arvid Norlin
Approved-by: Fredrik Thorsson
This commit is contained in:
Michael Zetterberg
2024-10-14 12:43:17 +00:00

View File

@@ -13,7 +13,7 @@ export const shortcutsSchema = z.object({
.object({
subtitle: z.string().nullable(),
title: z.string().nullable(),
two_column_list: z.boolean().default(false),
two_column_list: z.boolean().nullable().default(false),
shortcuts: z
.array(
z.object({
@@ -57,7 +57,7 @@ export const shortcutsSchema = z.object({
.transform(({ two_column_list, ...rest }) => {
return {
...rest,
hasTwoColumns: two_column_list,
hasTwoColumns: !!two_column_list,
}
}),
})