mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Avoid es-sham getPrototypeOf when constructor is not a function.
This commit is contained in:
@@ -8256,7 +8256,10 @@
|
|||||||
if (!(value && objToString.call(value) == objectTag)) {
|
if (!(value && objToString.call(value) == objectTag)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var proto = getPrototypeOf(value);
|
var proto = typeof value.constructor == 'function'
|
||||||
|
? getPrototypeOf(value)
|
||||||
|
: objectProto;
|
||||||
|
|
||||||
if (proto === null) {
|
if (proto === null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user