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