Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed optional array fields (Zod bridge) #1352

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

piotrpospiech
Copy link
Collaborator

Closes #1331

  • Unwrap field if it is ZodOptional

Tested with:

  • z.string().array().optional()
  • z.array(z.string()).optional()
  • other fields in the playground (All Fields (Zod))

@github-actions github-actions bot added Area: Bridge Affects some of the bridge packages Bridge: Zod Affects the uniforms-bridge-zod package labels Jun 16, 2024
@piotrpospiech piotrpospiech added this to the v4.0 milestone Jun 16, 2024
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.36%. Comparing base (26335df) to head (4a55500).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1352   +/-   ##
=======================================
  Coverage   94.35%   94.36%           
=======================================
  Files         200      200           
  Lines        3314     3316    +2     
  Branches      895      896    +1     
=======================================
+ Hits         3127     3129    +2     
  Misses         70       70           
  Partials      117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piotrpospiech piotrpospiech merged commit 9957632 into master Jul 25, 2024
7 checks passed
@piotrpospiech piotrpospiech deleted the zod-optional branch July 25, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Bridge Affects some of the bridge packages Bridge: Zod Affects the uniforms-bridge-zod package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Error 'parent.value is undefined' for z.string().array().optional()
4 participants