mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Use consistent nullish check for array.
This commit is contained in:
@@ -21,7 +21,7 @@ import baseUniq from './.internal/baseUniq.js'
|
||||
*/
|
||||
function uniqWith(array, comparator) {
|
||||
comparator = typeof comparator == 'function' ? comparator : undefined
|
||||
return (array && array.length) ? baseUniq(array, undefined, comparator) : []
|
||||
return (array != null && array.length) ? baseUniq(array, undefined, comparator) : []
|
||||
}
|
||||
|
||||
export default uniqWith
|
||||
|
||||
Reference in New Issue
Block a user