-
-
Notifications
You must be signed in to change notification settings - Fork 96
Nested empty object with no change counts as a change #28
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
Comments
Hey @LAITONEN which version of deep-object-diff are using to see this issue? I've tried to reproduce it but can't seem to, would you mind creating a repo with an example of the issue? Here's what I get when I try to reproduce using v1.1.0: |
Ah just seen you have closed this so I assume its working 😄 |
@mattphillips I resolved my issue, but, actually, there is an improvement that I would like to propose. The problem was that in one case Do you think this should be considered as "no change"? |
Hey, I think it’s correct that they are treated as being different as dod doesn’t place any bias on the values supplied and fundamentally an object is a different value to undefined |
If I pass the same object, which nests another object with no properties as a child, as both arguments of diff or detailedDiff, it will show that the change occurred and the change is an empty object.
In my application I needed to do this to circumvent the issue:
P.S. With detailedDiff this kind of 'change' is counted as "added".
The text was updated successfully, but these errors were encountered: