Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "enmap", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -124,3 +124,10 @@ /** | ||
if (!val) throw 'Cannot set null, undefined or empty value to a key. Use Enmap.delete(key) instead.'; | ||
let insert = typeof val === 'object' ? Object.create(val) : val; | ||
let insert = val; | ||
if (typeof val === 'object') { | ||
const temp = {}; | ||
for (const prop in val) { | ||
temp[prop] = val[prop]; | ||
} | ||
insert = temp; | ||
} | ||
insert = val.constructor.name === 'Array' ? [...insert] : insert; | ||
@@ -127,0 +134,0 @@ super.set(key, insert); |
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
66600
827