You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When on-change observes an array which is modified with unshift (or other methods which are able to insert or delete items somewhare alse than the end of the array) the handler will be fired for each re-index. similar to #56
because unshift starts first to move every item one index further and overwrites existing values with the beginning at the end
4
4
5
3
3
4
2
2
3
1
1
2
0
6
1
the origin unshift
There should be an option to avoid this behavior and only yield the origin change to the listener function. Maybe you could add an aditional parameter to the function, named "action" or something like that, to be able to determine what happened really.
The text was updated successfully, but these errors were encountered:
I can't replicate your issue. I only see one call to the listener function. I am working on #48 right now though, which will improve performance on specific methods.
When on-change observes an array which is modified with unshift (or other methods which are able to insert or delete items somewhare alse than the end of the array) the handler will be fired for each re-index. similar to #56
Example:
The output will be:
There should be an option to avoid this behavior and only yield the origin change to the listener function. Maybe you could add an aditional parameter to the function, named "action" or something like that, to be able to determine what happened really.
The text was updated successfully, but these errors were encountered: