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

Pass options to clone instead of get in applyVirtuals. #14606

Merged
merged 1 commit into from
May 24, 2024
Merged

Pass options to clone instead of get in applyVirtuals. #14606

merged 1 commit into from
May 24, 2024

Conversation

andrews05
Copy link
Contributor

@andrews05 andrews05 commented May 20, 2024

Summary

A bug introduced in v8.3.3 by #14543 caused toJSON to not be executed for virtual sub documents. The issue is caused by the options being incorrectly passed into the get function instead of the clone function.

Examples

I don't have an easy examples sorry, but I think the fix should be fairly evident. The intentions of #14543 was to pass noDottedPath: true to the get function but it mistakenly included the clone options which should have been passed to clone instead, as on line 4139 below it.

@vkarpov15 vkarpov15 added this to the 8.4.1 milestone May 24, 2024
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Very good catch, thank you!

@vkarpov15 vkarpov15 merged commit 53362c3 into Automattic:master May 24, 2024
18 checks passed
@andrews05 andrews05 deleted the fix/virtuals-fast-path branch May 27, 2024 00:31
vkarpov15 added a commit that referenced this pull request May 31, 2024
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.

2 participants