Comparing version 3.5.0 to 3.6.0
@@ -501,1 +501,15 @@ /* jshint asi:true */ | ||
}); | ||
QUnit.test(".serialize() leaves typed instances alone if _legacyAttrBehavior is true", function(){ | ||
function MyClass(value) { | ||
this.value = value; | ||
} | ||
var myMap = new Map({ | ||
_legacyAttrBehavior: true, | ||
myClass: new MyClass('foo') | ||
}); | ||
var ser = myMap.serialize(); | ||
QUnit.equal(ser.myClass, myMap.attr("myClass")); | ||
}); |
@@ -464,3 +464,7 @@ /* jshint -W079 */ | ||
___serialize: function(name, val){ | ||
return canReflect.serialize(val, CIDMap); | ||
if(this._legacyAttrBehavior) { | ||
return mapHelpers.getValue(this, name, val, "serialize"); | ||
} else { | ||
return canReflect.serialize(val, CIDMap); | ||
} | ||
}, | ||
@@ -467,0 +471,0 @@ |
@@ -239,3 +239,7 @@ /*can-map@3.4.2#can-map*/ | ||
___serialize: function (name, val) { | ||
return canReflect.serialize(val, CIDMap); | ||
if (this._legacyAttrBehavior) { | ||
return mapHelpers.getValue(this, name, val, 'serialize'); | ||
} else { | ||
return canReflect.serialize(val, CIDMap); | ||
} | ||
}, | ||
@@ -242,0 +246,0 @@ _getAttrs: function () { |
{ | ||
"name": "can-map", | ||
"version": "3.5.0", | ||
"version": "3.6.0", | ||
"description": "Observable Objects", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
334601
31
8210
1