Use consistent nullish check for array.

This commit is contained in:
John-David Dalton
2017-02-28 13:39:50 -08:00
parent 46ffbc1d90
commit d0f23b67ac
21 changed files with 21 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ import basePullAll from './.internal/basePullAll.js'
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
*/
function pullAllWith(array, values, comparator) {
return (array && array.length && values && values.length)
return (array != null && array.length && values != null && values.length)
? basePullAll(array, values, undefined, comparator)
: array
}