Use consistent null check in head.

This commit is contained in:
John-David Dalton
2017-02-05 22:31:39 -08:00
parent 6cb3460fce
commit 5219385eb2

View File

@@ -16,7 +16,7 @@
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined
return (array != null && array.length) ? array[0] : undefined
}
export default head