mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Use consistent nullish check for array.
This commit is contained in:
@@ -15,7 +15,7 @@ import baseSortedUniq from './.internal/baseSortedUniq.js'
|
||||
* // => [1.1, 2.3]
|
||||
*/
|
||||
function sortedUniqBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
return (array != null && array.length)
|
||||
? baseSortedUniq(array, iteratee)
|
||||
: []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user