noUnknown() & nullable() broken in 0.28.4
See original GitHub issueThis shouldn’t fail, and it didn’t prior to 0.28.4
:
const schema = object({
name: string()
}).nullable().noUnknown();
schema.validate(null) // this throws "Cannot convert undefined or null to object"
I’m guessing it has something to do with https://github.com/jquense/yup/pull/579
To Reproduce
See error on 0.28.4
: https://runkit.com/icflorescu/5ea1f46ebc48c6001a449316
Expected behavior
See it working correctly on 0.28.3
: https://runkit.com/icflorescu/5ea1f8227abc65001a36be1f
Platform (please complete the following information):
- Version 0.28.4
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
yup | Yarn - Package Manager
Yup separates the parsing and validating functions into separate steps. cast() transforms data while validate checks that the input is the correct shape....
Read more >yup - npm Package Health Analysis - Snyk
The npm package yup receives a total of 3,719,325 downloads a week. As such, we scored yup popularity level to be Key ecosystem...
Read more >What's New - xlwings Documentation
Feature The update() method of Excel tables has been moved from PRO to open source. You can now easily update an existing table...
Read more >CHANGELOG.md
BREAKING CHANGE: Change several fields from being nullable to late, final, ... #2523, #2525); originalMember is now an optional parameter to ModelElement().
Read more >changes - Apache
New svn_repos_fs_get_mergeinfo2() with streamy access (r1780810 et al) * New ... in svn:author (issue #4415) * dump: don't write broken dump files in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you please publish a new version on npm? Thanks a lot!
+1 for a release