canjs / can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
https://canjs.com/doc/can-connect.html
MIT License
29 stars 16 forks source link

Prevent trying to remove and insert a value in the same place #437

Closed justinbmeyer closed 5 years ago

justinbmeyer commented 5 years ago

fixes #436

updateListWithItem is used to update the position of records within a list. This was updating positions even if the list was going to end up removing and then inserting the record back in the place it was positioned.

I check to make sure that if the indexes indicate this is going to happen.

justinbmeyer commented 5 years ago

@phillipskevin can you review and release? Thanks!