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

Added strictBool option to schema #5856

Merged
merged 2 commits into from
Dec 2, 2017
Merged

Conversation

ekulabuhov
Copy link
Contributor

Summary
Same as #5344 but on Schema level.

Test plan
Include a test.
npm test -- -g 'strictBool': test passed

if (value === null) {
return value;
}

if (!this.options.strictBool) {
if (this.options.strictBool || (model.schema.options.strictBool && this.options.strictBool !== false)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model might not be defined if we're casting for a query, which is why the tests are failing on travis. Good work thus far but to get this merged we need to figure out what to do with that case so the tests succeed.

@ekulabuhov
Copy link
Contributor Author

I've looked at the failing tests and it looks like they are unrelated to the change. Tried running first one locally (gh-5737) and it fails randomly. Maybe a race condition?

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🍻

@vkarpov15 vkarpov15 merged commit 7dc384c into Automattic:master Dec 2, 2017
@vkarpov15 vkarpov15 added this to the 4.13.6 milestone Dec 2, 2017
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

Successfully merging this pull request may close these issues.

2 participants