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

feat(entity/update): remove nested prop in map when set to null #257

Merged
merged 6 commits into from Nov 7, 2022

Conversation

KeKs0r
Copy link
Contributor

@KeKs0r KeKs0r commented May 10, 2022

When trying to delete nested values in a map, I ran into issues, that it would crash when providing null as value. So I added it to have the same semantics as when providing undefined
There is a possibility to differentiate between the two. One could Remove the property and the other could set its value to null, but I think its better to handle them the same way: Removing the nested property.

@jeremydaly
Copy link
Owner

Can you refactor this to merge to main? v0.4 was merged in.

@rbdmorgan
Copy link
Contributor

@KeKs0r can't you use the $remove property here?

src/classes/Entity.ts Outdated Show resolved Hide resolved
src/classes/Entity.ts Outdated Show resolved Hide resolved
@naorpeled naorpeled changed the title [v0.4] Remove nested data in map when null or undefined is set as value feat(entity/update): remove nested prop in map when set to null Nov 7, 2022
@naorpeled naorpeled merged commit 9073c06 into jeremydaly:v0.4 Nov 7, 2022
@naorpeled
Copy link
Collaborator

Hey @KeKs0r,
thanks for your contribution!

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

4 participants