mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +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)) {
|
||||
return false;
|
||||
}
|
||||
var proto = getPrototypeOf(value);
|
||||
var proto = typeof value.constructor == 'function'
|
||||
? getPrototypeOf(value)
|
||||
: objectProto;
|
||||
|
||||
if (proto === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user