Closed ParaSwarm closed 7 years ago
This is by design. From the README:
Changes to arrays are recorded simplistically. We care most about the shape of the structure; therefore we don't take the time to determine if an object moved from one slot in the array to another. Instead, we only record the structural differences.
So when the lib looks at index 0, it sees an edit, same all the way to index 17, because the shorter array was 18 items long. Then on index 18, it sees index 18 didn't exist in the previous object and so records a new item, "USA".
I seem to be getting an error from a simple string array comparison. Version 0.3.7.
Ignoring all the redundant DiffEdits, I get a "DiffArray" which shows a new addition of string "USA" to the array, when clearly "USA" exists in both arrays, and item "AXG" was the item added to the edited array.
If this is an actual bug that can be replicated, it seems pretty urgent since it affects the core functionality / purpose of the library.
`
`