mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Ensure _.flatten works with _.map in underscore builds.
This commit is contained in:
6
dist/lodash.underscore.js
vendored
6
dist/lodash.underscore.js
vendored
@@ -1179,7 +1179,11 @@
|
||||
* _.flatten(characters, 'pets');
|
||||
* // => ['hoppy', 'baby puss', 'dino']
|
||||
*/
|
||||
function flatten(array, isShallow) {
|
||||
function flatten(array, isShallow, guard) {
|
||||
var type = typeof isShallow;
|
||||
if ((type == 'number' || type == 'string') && guard && guard[isShallow] === array) {
|
||||
isShallow = false;
|
||||
}
|
||||
return baseFlatten(array, isShallow);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user