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

stripUnknown ignores keys with value undefined #1620

Closed
npavlovichero opened this issue Mar 28, 2022 · 0 comments
Closed

stripUnknown ignores keys with value undefined #1620

npavlovichero opened this issue Mar 28, 2022 · 0 comments

Comments

@npavlovichero
Copy link

npavlovichero commented Mar 28, 2022

Describe the bug
Cast called with stripUnknown doesn't strip keys with value undefined. Not even with .strict(true) set.

To Reproduce

Reproducible example

Expected behavior
Since { key1: 'a', key2: undefined } is not the same as { key1: 'a' }, I expect cast called with { stripUnknown: true } to remove unknown keys regardless of their value. At the very list if strict(true) is set.

Platform (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant