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
Which performs a splice on the KO property array. This means that an array provided to the property would end up being mutated during any array operation performed on the property. When creating a
Property and providing it an array you might be surprised to see the array you provided mutated. This array
could be an array of application wide configuration for example, which when modified could lead to weird
bugs. Does it seem reasonable to instead do a slice on the array, thus preserving the original array?
The text was updated successfully, but these errors were encountered:
briandipalma
changed the title
KnockoutProperty.createArrayMethod should no longer splice the property array.
KnockoutProperty.createArrayMethod should no longer splice the property array.
Dec 11, 2015
Inside
KnockoutProperty
we have this code,Which performs a
splice
on the KO property array. This means that an array provided to the property would end up being mutated during any array operation performed on the property. When creating aProperty and providing it an array you might be surprised to see the array you provided mutated. This array
could be an array of application wide configuration for example, which when modified could lead to weird
bugs. Does it seem reasonable to instead do a
slice
on the array, thus preserving the original array?The text was updated successfully, but these errors were encountered: