Get update and updateDeep to work on list-like objects
This patch release fixes .update
and updateDeep
behavior when called on list-like objects.
The following code was throwing an exception due to both methods always calling canReflect.updateMap
and canReflect.updateDeepMap
under the hood even if the caller was an array.
class MyArray extends mixinMapProps(Array) {}
let arr = new MyArray();
arr.push(1, 2, 3, 4);
assert.equal(arr.length, 4);
arr.updateDeep([]); // throws an exception
assert.equal(arr.length, 0);