mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Wrap funcToString call in _.isNative in a try-catch.
This commit is contained in:
@@ -10838,7 +10838,9 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isFunction(value)) {
|
if (isFunction(value)) {
|
||||||
return reIsNative.test(funcToString.call(value));
|
try {
|
||||||
|
return reIsNative.test(funcToString.call(value));
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
return isObjectLike(value) &&
|
return isObjectLike(value) &&
|
||||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user