Comparing version 2.6.2 to 2.6.3
{ | ||
"name": "enmap", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -438,3 +438,3 @@ const dotProp = require('dot-prop'); | ||
} | ||
let data = super.get(key); | ||
const data = super.get(key); | ||
if (typeof data !== 'object') { | ||
@@ -445,3 +445,3 @@ throw 'Method can only be used when the value is an object or array'; | ||
const index = data.indexOf(val); | ||
data = data.slice(index, 1); | ||
data.splice(index, 1); | ||
} else { | ||
@@ -471,3 +471,3 @@ delete data[key]; | ||
} | ||
let propValue = dotProp.get(data, prop); | ||
const propValue = dotProp.get(data, prop); | ||
if (!propValue) { | ||
@@ -477,3 +477,3 @@ throw 'Property does not exist'; | ||
if (propValue.constructor.name === 'Array') { | ||
propValue = propValue.slice(propValue.indexOf(val), 1); | ||
propValue.splice(propValue.indexOf(val), 1); | ||
dotProp.set(data, prop, propValue); | ||
@@ -480,0 +480,0 @@ } else if (propValue.constructor.name === 'Object') { |
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
2197
101874