can-define
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -133,3 +133,3 @@ "use strict"; | ||
var instanceDefines = this._instanceDefinitions; | ||
if(instanceDefines && Object.prototype.hasOwnProperty.call(instanceDefines, prop)) { | ||
if(instanceDefines && Object.prototype.hasOwnProperty.call(instanceDefines, prop) && !Object.isSealed(this)) { | ||
delete instanceDefines[prop]; | ||
@@ -136,0 +136,0 @@ queues.batch.start(); |
@@ -1386,2 +1386,3 @@ var QUnit = require("steal-qunit"); | ||
QUnit.test("deleteKey works (#351)", function(){ | ||
var map = new DefineMap({foo: "bar"}); | ||
@@ -1409,2 +1410,9 @@ | ||
map.set("foo", "bar"); | ||
// With sealed | ||
map = new DefineMap({foo: "bar"}, true); | ||
map.deleteKey("foo"); | ||
QUnit.equal(map.foo, undefined, "prop set to undefined"); | ||
}); | ||
@@ -1411,0 +1419,0 @@ |
{ | ||
"name": "can-define", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "Create observable objects with JS dot operator compatibility", | ||
@@ -5,0 +5,0 @@ "main": "can-define.js", |
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
308156
7368