Skip to content

Commit 7a489cf

Browse files
committed
fix: handle edge case for zod version retrieval
1 parent 4827be4 commit 7a489cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/packages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export async function ensureDependencies(): Promise<boolean> {
55
}
66

77
const zodMajorVersion = await getPackageMajorVersion('zod')
8-
if (!zodMajorVersion || zodMajorVersion < 4) {
8+
// Sometimes there is a weird issue with getting zod version, so we just ignore it
9+
if (zodMajorVersion && zodMajorVersion < 4) {
910
console.error('nuxt-auto-form requires "zod" version >= 4 and found', zodMajorVersion)
1011
return false
1112
}

0 commit comments

Comments
 (0)