Comparing version 4.0.0-beta.2 to 4.0.0-beta.3
@@ -14,8 +14,8 @@ /** | ||
function evaluatePath(obj, kp) { | ||
if (typeof obj !== 'object' || obj === null || !obj) { | ||
if (!obj) { | ||
return null; | ||
} | ||
const { dotIndex, key, remaining } = state(kp); | ||
const kpVal = typeof obj === 'object' && kp in obj ? obj[kp] : null; | ||
const keyVal = key in obj ? obj[key] : null; | ||
const kpVal = typeof obj === 'object' && kp in obj ? obj[kp] : undefined; | ||
const keyVal = typeof obj === 'object' && key in obj ? obj[key] : undefined; | ||
// If there is a '.' in the key path and the key path doesn't appear in the object, recur on the subobject | ||
@@ -22,0 +22,0 @@ if (dotIndex >= 0 && typeof obj === 'object' && !(kp in obj)) { |
@@ -5,3 +5,3 @@ { | ||
"description": "A document path library for Node", | ||
"version": "4.0.0-beta.2", | ||
"version": "4.0.0-beta.3", | ||
"homepage": "https://mrodrig.github.io/doc-path", | ||
@@ -8,0 +8,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
14197