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
I'm seeing some unexpected behavior when using indexOf on an array property of a "watched object" created with on-change.
watched.a.indexOf(watched.a[0]) should return 0, and does when i first create an array. But if I filter the array and resassign it, indexOf no longer works properly.
It is probably clearer to look at the code below to see the problem.
I'm seeing some unexpected behavior when using indexOf on an array property of a "watched object" created with on-change.
watched.a.indexOf(watched.a[0])
should return 0, and does when i first create an array. But if I filter the array and resassign it, indexOf no longer works properly.It is probably clearer to look at the code below to see the problem.
I can sort of see how the proxy magic might confuse identity checks performed by indexOf, but I think that the behavior above is unintended.
I can work around the problem by using splice() instead of filter, but i'd like to use filter.
The text was updated successfully, but these errors were encountered: