Closed Jador closed 8 years ago
when removing an item and updating an item in the same list the diff removes the updated element twice, while not attempting to remove the deleted item at all
Example:
diff(List([1, 2, 3]), List([1, 2])).toJS(); // [ { op: "remove", path: "/2" } ] diff(List([1, 2, 3]), List([1, 'a'])).toJS(); // [ { op: "remove", path: "/1" }, { op: "remove", path: "/1" }, { op: "add", path: "/1", value: "a" } ]
Actually, referencing back to the rfc, I do believe your behaviour is correct. Time to go bother the api developer.
when removing an item and updating an item in the same list the diff removes the updated element twice, while not attempting to remove the deleted item at all
Example: