question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

noUnknown() & nullable() broken in 0.28.4

See original GitHub issue

This 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
icflorescucommented, Apr 25, 2020

Can you please publish a new version on npm? Thanks a lot!

3reactions
Philipp91commented, Apr 26, 2020

+1 for a release

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found