use-zod-default 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -144,6 +144,9 @@ const defaultInstance = (schema, source = {}) => {
|
|
|
144
144
|
if (schema instanceof z.ZodEffects) {
|
|
145
145
|
return processEffect(schema, value);
|
|
146
146
|
}
|
|
147
|
+
if (schema instanceof z.ZodDefault) {
|
|
148
|
+
return processValue(schema._def.innerType, value);
|
|
149
|
+
}
|
|
147
150
|
if (schema instanceof z.ZodMap) {
|
|
148
151
|
return processMap(schema, value);
|
|
149
152
|
}
|
package/package.json
CHANGED