mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Remove isFlattenableIteratee predicate to resolve regression. [closes #2418]
This commit is contained in:
22
lodash.js
22
lodash.js
@@ -4915,7 +4915,7 @@
|
||||
return rest(function(iteratees) {
|
||||
iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
|
||||
? arrayMap(iteratees[0], baseUnary(getIteratee()))
|
||||
: arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee()));
|
||||
: arrayMap(baseFlatten(iteratees, 1), baseUnary(getIteratee()));
|
||||
|
||||
return rest(function(args) {
|
||||
var thisArg = this;
|
||||
@@ -5821,18 +5821,6 @@
|
||||
return isArray(value) || isArguments(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a flattenable array and not a `_.matchesProperty`
|
||||
* iteratee shorthand.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
||||
*/
|
||||
function isFlattenableIteratee(value) {
|
||||
return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
@@ -9426,11 +9414,7 @@
|
||||
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
||||
iteratees = [iteratees[0]];
|
||||
}
|
||||
iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
|
||||
? iteratees[0]
|
||||
: baseFlatten(iteratees, 1, isFlattenableIteratee);
|
||||
|
||||
return baseOrderBy(collection, iteratees, []);
|
||||
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
||||
});
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
@@ -10132,7 +10116,7 @@
|
||||
var overArgs = rest(function(func, transforms) {
|
||||
transforms = (transforms.length == 1 && isArray(transforms[0]))
|
||||
? arrayMap(transforms[0], baseUnary(getIteratee()))
|
||||
: arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee()));
|
||||
: arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
||||
|
||||
var funcsLength = transforms.length;
|
||||
return rest(function(args) {
|
||||
|
||||
Reference in New Issue
Block a user