diff options
Diffstat (limited to 'node_modules/lodash/_basePullAt.js')
-rw-r--r-- | node_modules/lodash/_basePullAt.js | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js index de2e0067d..c3e9e7102 100644 --- a/node_modules/lodash/_basePullAt.js +++ b/node_modules/lodash/_basePullAt.js @@ -1,8 +1,5 @@ -var castPath = require('./_castPath'), - isIndex = require('./_isIndex'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -29,14 +26,8 @@ function basePullAt(array, indexes) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); - } - else { - var path = castPath(index, array), - object = parent(array, path); - - if (object != null) { - delete object[toKey(last(path))]; - } + } else { + baseUnset(array, index); } } } |