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): allow setting nested path to null #14226

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Conversation

vkarpov15
Copy link
Collaborator

Fix #14205

Summary

Still debugging the need for the valForKey === null check, but otherwise this works. Without the === null check, the with conflicted data in db test in model.test.js fails; it looks like because we don't store validation errors on nested paths. Will take another look tomorrow.

Examples

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

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

LGTM, thanks 👍

@vkarpov15
Copy link
Collaborator Author

I took a closer look and the == null check is necessary because of this code later on in $set which handles setting a nested path to non-nullish.

@vkarpov15 vkarpov15 added this to the 6.12.5 milestone Jan 2, 2024
@vkarpov15 vkarpov15 merged commit f37b4f2 into 6.x Jan 2, 2024
34 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14205 branch January 2, 2024 17:06
vkarpov15 added a commit that referenced this pull request Jan 2, 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.

None yet

2 participants