Comparing version 3.1.0-pre.15 to 3.1.0-pre.16
@@ -27,3 +27,3 @@ // # can/map/map_helpers | ||
var makeArray = require('can-util/js/make-array/make-array'); | ||
var types = require('can-types'); | ||
var canReflect = require('can-reflect'); | ||
var isEmptyObject = require('can-util/js/is-empty-object/is-empty-object'); | ||
@@ -96,3 +96,3 @@ | ||
add: function(parent, child, prop){ | ||
if(types.isMapLike( child ) && parent._bubbleBindings) { | ||
if(canReflect.isObservableLike(child) && canReflect.isMapLike(child) && parent._bubbleBindings) { | ||
for(var eventName in parent._bubbleBindings) { | ||
@@ -117,3 +117,3 @@ if( parent._bubbleBindings[eventName] ) { | ||
remove: function(parent, child){ | ||
if(types.isMapLike( child ) && parent._bubbleBindings) { | ||
if(canReflect.isObservableLike(child) && canReflect.isMapLike(child) && parent._bubbleBindings) { | ||
for(var eventName in parent._bubbleBindings) { | ||
@@ -137,7 +137,7 @@ if( parent._bubbleBindings[eventName] ) { | ||
if( types.isMapLike(value) ) { | ||
if(canReflect.isObservableLike(value) && canReflect.isMapLike(value)) { | ||
bubble.add(parent, value, prop); | ||
} | ||
// bubble.add will remove, so only remove if we are replacing another object | ||
if( types.isMapLike(current) ) { | ||
if(canReflect.isObservableLike(current) && canReflect.isMapLike(current)) { | ||
bubble.remove(parent, current); | ||
@@ -169,3 +169,3 @@ } | ||
args[0] = | ||
(types.isListLike( parent ) ? | ||
((canReflect.isObservableLike(parent) && canReflect.isListLike(parent)) ? | ||
parent.indexOf(child) : | ||
@@ -172,0 +172,0 @@ prop ) + (args[0] ? "."+args[0] : ""); |
@@ -727,11 +727,2 @@ /* jshint -W079 */ | ||
var oldIsMapLike = types.isMapLike; | ||
types.isMapLike = function(obj){ | ||
if(obj instanceof Map) { | ||
return true; | ||
} else { | ||
return oldIsMapLike.call(this, obj); | ||
} | ||
}; | ||
if(!types.DefaultMap) { | ||
@@ -738,0 +729,0 @@ types.DefaultMap = Map; |
{ | ||
"name": "can-map", | ||
"version": "3.1.0-pre.15", | ||
"version": "3.1.0-pre.16", | ||
"description": "Observable Objects", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77546
1471