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.
Files changed (2) hide show
  1. package/dist/index.js +3 -0
  2. 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
@@ -30,5 +30,5 @@
30
30
  "test": "vitest",
31
31
  "test:coverage": "rm -rf coverage && vitest --run --coverage"
32
32
  },
33
- "version": "1.0.12"
33
+ "version": "1.0.13"
34
34
  }