Skip to content

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

Merged
vkarpov15 merged 1 commit into
Automattic:masterfrom
andrews05:fix/virtuals-fast-path
May 24, 2024
Merged

Pass options to clone instead of get in applyVirtuals.#14606
vkarpov15 merged 1 commit into
Automattic:masterfrom
andrews05:fix/virtuals-fast-path

Conversation

@andrews05

@andrews05 andrews05 commented May 20, 2024

Copy link
Copy Markdown
Contributor

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

@vkarpov15 vkarpov15 left a comment

Copy link
Copy Markdown
Collaborator

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
@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