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): set defaults on subdocuments underneath init-ed single nested subdocument #12523

Merged
merged 3 commits into from Oct 5, 2022

Conversation

vkarpov15
Copy link
Collaborator

Fix #12515

Summary

There was a bug with our fix for #12328 (47ce125): we were really trying to just skip applying defaults on the initial construction of the document. But we ended up skipping applying defaults for the rest of the subdocument's lifecycle, which introduces the bug pointed out in #12515. With this fix, we're only skipping applying defaults on the initial subdocument creation, as intended.

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.

LGTM

test/document.test.js Show resolved Hide resolved
@vkarpov15 vkarpov15 merged commit 542ce79 into master Oct 5, 2022
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-12515 branch October 5, 2022 15:04
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.

_id is missing in subDoc
2 participants