fix: make set nullable provider options to optional

This commit is contained in:
Ryan J. Dillon 2025-07-01 16:45:22 +02:00
parent ea6bfef21a
commit c72ae70a4a

View file

@ -521,7 +521,7 @@ export namespace Provider {
for (const [key, value] of Object.entries(shape)) {
const zodValue = value as z.ZodTypeAny
if (zodValue instanceof z.ZodOptional) {
newShape[key] = zodValue.unwrap().nullable()
newShape[key] = zodValue.unwrap().nullable().optional()
} else {
newShape[key] = optionalToNullable(zodValue)
}