diff --git a/lodash.js b/lodash.js index e0dcbd9b9..9315671a8 100644 --- a/lodash.js +++ b/lodash.js @@ -1006,6 +1006,18 @@ return '\\' + stringEscapes[chr]; } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object[key]; + } + /** * Gets the index at which the first occurrence of `NaN` is found in `array`. * @@ -5393,7 +5405,7 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; + var value = getValue(object, key); return (isMaskable(value) ? baseIsNative : isNative)(value) ? value : undefined; }