Skip to content

Commit

Permalink
Fix/empty effect (#21)
Browse files Browse the repository at this point in the history
fix empty function for ZodEffects: return internal schema
  • Loading branch information
toiroakr authored Jan 8, 2025
2 parents 5771c43 + e8cfefa commit 1f32ae2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export function empty<T extends ZodTypeAny>(schema: T): input<T> {
case "ZodNullable":
case "ZodOptional":
return empty(def.innerType);
case "ZodEffects":
return empty(def.schema);
case "ZodLiteral":
return def.value;
case "ZodNaN":
Expand Down

0 comments on commit 1f32ae2

Please sign in to comment.