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

fix(document): avoid treating nested projection as inclusive when applying defaults #14173

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #14115

Summary

Right now nested projections, like { prop: { subprop: 1 } }, throw off the logic that checks for projections when applying defaults. So { prop: { subprop: 1 } } will still apply defaults on all properties underneath prop that have defaults other than subprop.

With this PR, we won't treat { prop: { subprop: 1 } } as { prop: 1} for applying defaults, which is what our applyDefaults() function does now.

Examples

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

the code looks good, but any tests for this?

@vkarpov15
Copy link
Collaborator Author

@hasezoey thanks for reminder, I pushed tests in dadac4e

@vkarpov15 vkarpov15 added this to the 6.12.4 milestone Dec 14, 2023
@vkarpov15 vkarpov15 merged commit d36d134 into 6.x Dec 14, 2023
33 of 34 checks passed
@hasezoey hasezoey deleted the vkarpov15/handle-nested-projections branch December 15, 2023 15:20
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.

None yet

2 participants