Skip to content

Commit

Permalink
removed initial value from enum type
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpospiech committed Oct 23, 2024
1 parent 2b680f2 commit d41421a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/uniforms-bridge-zod/src/ZodBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ export default class ZodBridge<T extends ZodRawShape> extends Bridge {
return field._def.defaultValue();
}

if (field instanceof ZodEnum) {
return field.options[0];
}

if (field instanceof ZodNativeEnum) {
const values = Object.values(field.enum as Record<string, unknown>);
return values.find(isNativeEnumValue) ?? values[0];
Expand Down

0 comments on commit d41421a

Please sign in to comment.