From 08deff799abcd478dbdd2b9b928fec68abf8eb85 Mon Sep 17 00:00:00 2001 From: Nils Kolvenbach Date: Thu, 27 Jun 2024 12:25:17 +0200 Subject: [PATCH] Potential fix for "TypeError: Cannot read properties of undefined (reading '_parseSync')" --- .changeset/shy-pumpkins-invite.md | 5 +++++ src/entrySchema.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/shy-pumpkins-invite.md diff --git a/.changeset/shy-pumpkins-invite.md b/.changeset/shy-pumpkins-invite.md new file mode 100644 index 0000000..b3df1a8 --- /dev/null +++ b/.changeset/shy-pumpkins-invite.md @@ -0,0 +1,5 @@ +--- +'@elek-io/shared': patch +--- + +Potential fix for "TypeError: Cannot read properties of undefined (reading '\_parseSync')" diff --git a/src/entrySchema.ts b/src/entrySchema.ts index 97efaa6..7a2e7fb 100644 --- a/src/entrySchema.ts +++ b/src/entrySchema.ts @@ -29,7 +29,7 @@ export type Entry = z.infer & { )[]; }; export const entrySchema = entryFileSchema.extend({ - values: z.array(resolvedValueSchema), + values: z.array(z.lazy(() => resolvedValueSchema)), }) satisfies z.ZodType; export const entryExportSchema = entrySchema.extend({});