mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Use consistent nullish check for array.
This commit is contained in:
@@ -19,7 +19,7 @@ import baseUniq from './.internal/baseUniq.js'
|
||||
* // => [2.1, 1.2]
|
||||
*/
|
||||
function uniqBy(array, iteratee) {
|
||||
return (array && array.length) ? baseUniq(array, iteratee) : []
|
||||
return (array != null && array.length) ? baseUniq(array, iteratee) : []
|
||||
}
|
||||
|
||||
export default uniqBy
|
||||
|
||||
Reference in New Issue
Block a user