Closed LennartC closed 9 years ago
Looks like this could be related to #3 (my issue), as it relates to arrays, and doesn't necessarily produce a patch that results in the desired outcome.
You are correct, it's the same issue as #3 . And where you say:
/*
`diff` is equal to:
[
{ op: 'remove', path: '/arr/1' },
{ op: 'remove', path: '/arr/2' }
]
which is correct
*/
It is actually wrong. It should be:
[
{ op: 'remove', path: '/arr/1' },
{ op: 'remove', path: '/arr/1' }
]
@LennartC Good catch! I'll update my issue.
Thanks for the bug report. Fixed in v1.0.5. See my comment in #3 for explanation.
And this is wrong. The first patch makes the array look like:
And because the patches are sequential, the second patch will remove A, making it look like
So the second patch should be: