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
Currently the onPatches callback does not correctly check the type of received patches.
As you can see below, the code only checks for a type == "move" or 'anything else':
'Anything else' can be problematic when you have a type which emits other type of patches in addition to list-like { type : "splice" } patches, like say... an observable variant of Set - which would emit { type : "values" } patches. These will be partially processed in a wrong way and might even involve exceptions being thrown. When really; they should just be ignored, because the type is incompatible.
The entire patcher also seems to not correctly use 'safe' means of iterating the lists using can-reflect.
It is possible to have a type that implements an iterator (and thus is deemed can.isListLike ) but which is NOT actually fully list-like and which does NOT implement index-based random access accessors.
The text was updated successfully, but these errors were encountered:
Currently the
onPatches
callback does not correctly check thetype
of received patches.As you can see below, the code only checks for a
type == "move"
or 'anything else':can-view-live/lib/list.js
Lines 148 to 168 in b0735a2
'Anything else' can be problematic when you have a type which emits other type of patches in addition to list-like
{ type : "splice" }
patches, like say... an observable variant ofSet
- which would emit{ type : "values" }
patches. These will be partially processed in a wrong way and might even involve exceptions being thrown. When really; they should just be ignored, because the type is incompatible.The entire patcher also seems to not correctly use 'safe' means of iterating the lists using
can-reflect
.It is possible to have a type that implements an iterator (and thus is deemed
can.isListLike
) but which is NOT actually fully list-like and which does NOT implement index-based random access accessors.The text was updated successfully, but these errors were encountered: