mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Add isObject check to getNative.
This commit is contained in:
@@ -4105,7 +4105,10 @@
|
|||||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||||
*/
|
*/
|
||||||
function getNative(object, key) {
|
function getNative(object, key) {
|
||||||
var value = object == null ? undefined : object[key];
|
if (!isObject(object)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var value = object[key];
|
||||||
if (isNative(value)) {
|
if (isNative(value)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user