From 9c27ed8bda76612571c47a227dd8fefe7bba4552 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 6 Oct 2015 07:07:49 -0700 Subject: [PATCH] Remove nullish checks from `baseHas` and `baseHasIn`. --- lodash.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index 1c732fd45..5c2a8f8f2 100644 --- a/lodash.js +++ b/lodash.js @@ -2511,9 +2511,6 @@ * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - if (object == null) { - return false; - } // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null` // incorrectly report `false` for own index properties. return hasOwnProperty.call(object, key) || @@ -2529,7 +2526,7 @@ * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return object != null && key in Object(object); + return key in Object(object); } /**