Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Core: guard against null & undefined values in required method#2053
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Core: guard against null & undefined values in required method#2053
Uh oh!
There was an error while loading.Please reload this page.
Conversation
staabm left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add a test
a8f6905 to92faa3bCompareArkni commentedSep 2, 2017
I don't think there is a way to test it without using the normalizer. But the normalizer will not return I will update the tests of the other PR and merge it and then update this one to use the normalizer. For now, I added a description to the commit describing the needs for this fix. |
staabm commentedSep 2, 2017
Merged the other pr, we can add the tests here |
c43f371 to7b535efCompareArkni commentedSep 2, 2017
We are good to go. |
An input element will never have undefined or null as valuebut the normalizer may return null or undefined for an element.Also, jQuery (< 3.x) returns `null` for select element with themultiple attribute set if no options are selected.As a result, the required method should guard against that.
7b535ef to83bfd48CompareArkni commentedSep 2, 2017
I'm going to merge this for now. |
staabm commentedSep 2, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Awesome that our normalizer layer also turned out to be a good value-mocking test utility 😸 Great job, thx |
Arkni commentedSep 2, 2017
Yes, and also I see (from Stackoverflow and here) that a lot of folks are using it and found it useful too. Thanks :) |
Ref#2049