Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks
https://atmospherejs.com/matb33/collection-hooks
MIT License
656 stars 90 forks source link

fix: replace and remove functions search indexes before splicing #286

Closed jankapunkt closed 1 year ago

jankapunkt commented 1 year ago

This intends to fix #268 by avoiding usage of len for replace and remove but rather finds the correct index of the added objects before replacing/removing them. By doing so there should be no issue anymore with a given order of adding and removing or replacing hooks.