canjs v6.2.1 Release Notes

Release Date: 2019-10-23 // over 4 years ago
  • ๐Ÿš€ canjs/canjs v6.2.1 Release Notes

    ๐Ÿš€ can-observable-array

    ๐Ÿ‘‰ Make sure for...in works with can-observable-array instances

    ๐Ÿš€ This patch release fixes an issue where ownKeys returned an array with duplicated keys causing the following code to throw an exception

    import { ObservableArray } from "//unpkg.com/can@6/core.mjs";class List extends ObservableArray {}let list = new List();for (var name in list) { console.log(name); }
    

    ๐Ÿš€ can-observable-mixin

    โšก๏ธ 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 exceptionassert.equal(arr.length, 0);