Ensure _.pullAt sorts indexes greater than 9 correctly. [closes #2254]

This commit is contained in:
John-David Dalton
2016-04-14 16:17:32 -07:00
parent f6c14ec31f
commit 1a1e0e1a6b
2 changed files with 6 additions and 6 deletions

View File

@@ -3461,7 +3461,7 @@
while (length--) {
var index = indexes[length];
if (lastIndex == length || index != previous) {
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
@@ -6837,7 +6837,7 @@
* // => [10, 20]
*/
var pullAt = rest(function(array, indexes) {
indexes = arrayMap(baseFlatten(indexes, 1), String);
indexes = baseFlatten(indexes, 1);
var result = baseAt(array, indexes);
basePullAt(array, indexes.sort(compareAscending));