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): handle setting nested path to spread doc with extra properties #14287

Merged
merged 1 commit into from Jan 24, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14269

Summary

Quick improvement for handling spread docs in $set(). true means we retain existing properties, so { ...doc, foo: true } will still have foo: true.

Worth noting that we don't currently have a good way of handling key order - I'm looking into that. But { foo: true, ...doc } currently will still have foo: true, even if doc has foo: false.

Examples

Copy link
Collaborator

@IslandRhythms IslandRhythms left a comment

Choose a reason for hiding this comment

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

LGTM

@vkarpov15 vkarpov15 merged commit 2a7fdef into master Jan 24, 2024
34 checks passed
@vkarpov15 vkarpov15 added this to the 8.1.1 milestone Jan 24, 2024
@hasezoey hasezoey deleted the vkarpov15/gh-14269 branch January 25, 2024 11:49
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.

Cannot patch a sub-document with destructuring
2 participants