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