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): make $clone avoid converting subdocs into POJOs #14395

Merged
merged 3 commits into from Mar 4, 2024

Conversation

vkarpov15
Copy link
Collaborator

Re: #14353

Summary

Fix for this issue from #14353, there are a couple of unrelated issues reported in #14353. This particular issue is that document $clone method converts subdocs into POJOs, which is definitely incorrect.

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, would recommend to merge master again to verify tests, also one minor style question / suggestion.

lib/helpers/clone.js Outdated Show resolved Hide resolved
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; i didnt initially notice that the check for a boolean would not be working correctly.

@vkarpov15 vkarpov15 merged commit 6ed3385 into master Mar 4, 2024
34 checks passed
@vkarpov15 vkarpov15 added this to the 8.2.1 milestone Mar 4, 2024
@hasezoey hasezoey deleted the vkarpov15/gh-14353 branch March 5, 2024 10:15
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