Skip to content

Commit

Permalink
fix(conform-zod): use parseFloat not parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Muser committed Nov 17, 2023
1 parent 8f09cc7 commit b8664e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/conform-zod/coercion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function enableTypeCoercion<Type extends ZodTypeAny>(
.pipe(type);
} else if (type instanceof ZodNumber) {
schema = any()
.transform((value) => coerceString(value, parseInt))
.transform((value) => coerceString(value, parseFloat))
.pipe(type);
} else if (type instanceof ZodBoolean) {
schema = any()
Expand Down

0 comments on commit b8664e2

Please sign in to comment.