mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Ensure _.pullAt sorts indexes greater than 9 correctly. [closes #2254]
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user