-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove fails if the value for the key is undefined. #38
Comments
Issue still exists. While technically undefined is not a supported type in JSON, it is supported in JavaScript, possibly we could enable a flag in the options to allow this behaviour. Current code has the issue triggering at Lines 180 to 182 in 035d5ac
This would also need to be reflected in the type hints as currently we only allow null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A { a: undefined }
B {}
patch = diff(A,B) (results in 'remove a')
patchInPlace(patch, A)
fails with "path does not exist"
The cause is the check for pointer.target[pointer.key] not being undefined.
The key needs to be present, but if the value is undefined that shouldn't prevent a removal.
The text was updated successfully, but these errors were encountered: