mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +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`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
if (!isObject(object)) {
|
||||
return;
|
||||
}
|
||||
var value = object[key];
|
||||
if (isNative(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user