mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Remove coercion method use.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import baseFlatten from './.internal/baseFlatten.js'
|
||||
import toInteger from './toInteger.js'
|
||||
|
||||
/**
|
||||
* Recursively flatten `array` up to `depth` times.
|
||||
@@ -25,7 +24,7 @@ function flattenDepth(array, depth) {
|
||||
if (!length) {
|
||||
return []
|
||||
}
|
||||
depth = depth === undefined ? 1 : toInteger(depth)
|
||||
depth = depth === undefined ? 1 : +depth
|
||||
return baseFlatten(array, depth)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user