-
Notifications
You must be signed in to change notification settings - Fork 74
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
Items that do not move show as being moved #32
Comments
Would you mind showing me the code you're using to diff the arrays? A reproduction in a Playground would be a huge help if you have time. |
Hi, I am seeing the same issue. I can reproduce simply by using this code:
These are the patches produced:
Like @Chandlerdea says, the last patch would cause a crash due to index out of bounds. |
Thanks for the example, @georgenavarro - I appreciate it. I'm pretty busy at the moment, so I'm not sure when I'll have a chance to look at fixing this issue. If either of you gets a chance in the meantime, a PR with tests showing and/or fixing the problem are always welcome. |
I am seeing some weird behavior when diffing arrays which have contents that do not move. Here is the scenario:
I have two arrays, which look like this:
One of the patches returned the
extendedPatch()
function looks like this:This is causing a crash in my app, because there is no item at index 20 in the array. You can see that the object at index 16 doesn't move, but for some reason the library is saying that it has moved.
The text was updated successfully, but these errors were encountered: