Skip to content

Releases: canjs/can-map

Fix attempts to bubble bind non-observable children

23 Jan 22:23
Compare
Choose a tag to compare

Attempts to set up bubble bindings (i.e. deep "change" listeners) when map-like children of a can-map are not observable would cause errors. This version of can-map now checks for observability on map-like children before attempting to set up bubble bindings.

See #150 for more.

Prevent bubble parent with children arrays

07 Oct 19:00
Compare
Choose a tag to compare

Children array properties should not bubble parent:

var map = new CanMap({
     foo: ['item']
});

bubble.childrenOf(map, "change");
bubble.events(map.attr("foo") // -> undefined

Prevent bubble parent with children functions

16 Sep 18:17
Compare
Choose a tag to compare

This fixes bubbling the parent map with children functions as properties, for example:

var map = new CanMap({
    fn: function() {}
});

bubble.childrenOf(map, "change");

bubble.events(map.fn, "change"); // -> undefined

#146

Tests using canReflect.getName in assertions fail in IE11

05 Jun 21:17
Compare
Choose a tag to compare

Test failed due to canReflect.getName returning a certain value fail in IE11 because of how we name functions differently in IE11. With this fix, the tests use regular expressions to make the assertions less strict.

Issue #141

Warn on mutations done at unsafe times

03 Jun 18:19
Compare
Choose a tag to compare

Observable data (e.g. the properties of a can-map) should not be set while derived values are being computed. With this update, users will be warned in development mode in cases where this is happening.

#137

QUNIT2 upgrade

28 May 18:34
Compare
Choose a tag to compare

This updates the tests to use QUnit@2.x.x.

#135

Use Symbol to replace __inSetup property

26 Apr 15:34
Compare
Choose a tag to compare

Replace __inSetup property checks with Symbol.

canjs/canjs#4705

Cleanup can-types.isMapLike(obj)

09 Apr 22:59
Compare
Choose a tag to compare

Replace usage of can-types.isMapLike(obj) by canReflect.isObservableLike(obj) && canReflect.isMapLike(obj)

Handles props with undefined values

14 Aug 21:19
Compare
Choose a tag to compare

Makes sure that any props on the map are still added when their value is undefined, whether during construction or set later. PR#122

Makes deep assigns and updates work with _legacyAttrBehavior

14 Aug 18:04
Compare
Choose a tag to compare

When using _legacyAttrBehavior: true to enable the legacy attr
behavior you still want to interop with other map types. For this to
work:

map.attr({
  prop: new DefineMap()
})

This works with both assign and update forms of attr().