diff --git a/lib/index.js b/lib/index.js index dd0144b..3a6f442 100644 --- a/lib/index.js +++ b/lib/index.js @@ -69,7 +69,7 @@ function _delete(obj, prop) { let clone, head = prop[i]; if (obj === null || typeof obj !== 'object' || - !Array.isArray(obj) && obj[head] === undefined) { + !Array.isArray(obj) && !obj.hasOwnProperty(head)) { return obj; }