| CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 1
Releases: canjs/can-map
Fix attempts to bubble bind non-observable children
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.
Assets 2
Prevent bubble parent with children arrays
Children array properties should not bubble parent:
var map = new CanMap({
foo: ['item']
});
bubble.childrenOf(map, "change");
bubble.events(map.attr("foo") // -> undefinedAssets 2
Prevent bubble parent with children functions
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"); // -> undefinedAssets 2
Tests using canReflect.getName in assertions fail in IE11
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.
Assets 2
Warn on mutations done at unsafe times
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.
Assets 2
QUNIT2 upgrade
This updates the tests to use QUnit@2.x.x.
Assets 2
Use Symbol to replace __inSetup property
Replace __inSetup property checks with Symbol.
Assets 2
Cleanup can-types.isMapLike(obj)
Replace usage of can-types.isMapLike(obj) by canReflect.isObservableLike(obj) && canReflect.isMapLike(obj)
Assets 2
Handles props with undefined values
Makes sure that any props on the map are still added when their value is undefined, whether during construction or set later. PR#122
Assets 2
Makes deep assigns and updates work with _legacyAttrBehavior
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().