Skip to content

Commit

Permalink
fix(schema): nullable boolean default to false and do not throw anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Plopix committed Apr 15, 2024
1 parent bfd892b commit c51c13f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crystallize/schema",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions src/shape/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const ContentChunkComponentConfigInputSchema: z.ZodType<ContentChunkCompo
.lazy(() =>
z.object({
components: z.array(ShapeComponentInputSchema),
repeatable: z.boolean().default(false),
repeatable: z.coerce.boolean().default(false),
}),
)
.refine(
Expand Down Expand Up @@ -238,7 +238,7 @@ export const SelectionComponentConfigInputSchema = MinMaxComponentConfigSchema.a
z.object({
key: z.string().min(1),
value: z.string().min(1),
isPreselected: z.boolean().default(false),
isPreselected: z.coerce.boolean().default(false),
}),
)
.optional()
Expand Down

0 comments on commit c51c13f

Please sign in to comment.