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

Do not initialize spec values with undefined #1177

Merged
merged 2 commits into from
Dec 13, 2020

Conversation

cemalettin-work
Copy link
Contributor

@cemalettin-work cemalettin-work commented Dec 12, 2020

Otherwise spreading spec values like previously would overwrite the base schema spec values with undefined.
Closes #1160.

@jquense
Copy link
Owner

jquense commented Dec 13, 2020

thanks for the PR, i'd need some context for why this behavior should be changed and tests as well

@jquense
Copy link
Owner

jquense commented Dec 13, 2020

oops sorry i didn't see the linked issue 👍 do still need tests tho

src/schema.ts Outdated Show resolved Hide resolved
Concatting schemas can overwrite previous non-undefined values with undefined
@cemalettin-work cemalettin-work changed the title Do not overwrite spec values with undefined when concatenating schemas Do not initialize spec values with undefined Dec 13, 2020
@jquense jquense merged commit e8e5b46 into jquense:master Dec 13, 2020
@jquense
Copy link
Owner

jquense commented Dec 13, 2020

thanks!

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.

baseSchema.concat(otherSchema) overwrites baseSchema properties when otherSchema properties are undefined
2 participants