zod
zod copied to clipboard
fix: [#1693] Tuple with empty items
map() as referenced in MDN is is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.
In some cases, these slots behave as undefined (that would be caught by existing implementation) but in others (e.g. array iteration methods), empty slots are skipped. More info here.
Destructing will result in usage of property enumeration instead of iterator which should fix this issue.
Screenshot for reference.

Fixes both: ZodTuple and ZodArray.
Reported in #1693
Deploy Preview for guileless-rolypoly-866f8a ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 0aaebaae11b919323e633d5ecf2ab691507b8e11 |
| Latest deploy log | https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/639d14a4552e4e0009b36c55 |
| Deploy Preview | https://deploy-preview-1712--guileless-rolypoly-866f8a.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Gotta love JavaScript. Thanks!