mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Use consistent nullish check for array.
This commit is contained in:
@@ -22,7 +22,7 @@ import baseWhile from './.internal/baseWhile.js'
|
||||
* // => objects for ['pebbles']
|
||||
*/
|
||||
function dropWhile(array, predicate) {
|
||||
return (array && array.length)
|
||||
return (array != null && array.length)
|
||||
? baseWhile(array, predicate, true)
|
||||
: []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user