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(populate): call setter on virtual populated path with populated doc instead of undefined #14314

Merged
merged 3 commits into from Feb 5, 2024

Conversation

vkarpov15
Copy link
Collaborator

@vkarpov15 vkarpov15 commented Feb 1, 2024

Fix #14285

Summary

Looks like the virtual populate setter doesn't correctly return the populated doc, this PR fixes that. Also did a quick bit of refactor to make it so that we have less populate logic in lib/schema.js.

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.

Looks good to me, aside from some jsdoc

@vkarpov15 vkarpov15 added this to the 8.1.2 milestone Feb 5, 2024
@vkarpov15 vkarpov15 merged commit 33c2f4f into master Feb 5, 2024
34 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14285 branch February 5, 2024 22:13
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.

virtual setter called with value undefined on populate
2 participants