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

2
nth.js
View File

@@ -21,7 +21,7 @@ import toInteger from './toInteger.js'
* // => 'c'
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined
return (array != null && array.length) ? baseNth(array, toInteger(n)) : undefined
}
export default nth