From f880e398385a79f76005cdd73d91a68d9db60151 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 6 Oct 2015 20:11:31 -0700 Subject: [PATCH] Clarify bug comment of `baseHas`. [ci skip] --- lodash.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 5c2a8f8f2..9feaa2b87 100644 --- a/lodash.js +++ b/lodash.js @@ -2511,8 +2511,9 @@ * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null` - // incorrectly report `false` for own index properties. + // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, + // that are composed entirely of index properties, return `false` for + // `hasOwnProperty` checks of them. return hasOwnProperty.call(object, key) || (typeof object == 'object' && key in object && getPrototypeOf(object) === null); }