mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-15 13:17:50 +00:00
Fix test fails on old Android & Safari.
This commit is contained in:
@@ -7461,10 +7461,13 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isNative(value) {
|
function isNative(value) {
|
||||||
if (typeof value == 'function' || toString.call(value) == funcClass) {
|
if (value == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (toString.call(value) == funcClass) {
|
||||||
return reNative.test(fnToString.call(value));
|
return reNative.test(fnToString.call(value));
|
||||||
}
|
}
|
||||||
return (value && typeof value == 'object' &&
|
return (typeof value == 'object' &&
|
||||||
(isHostObject(value) ? reNative : reHostCtor).test(value)) || false;
|
(isHostObject(value) ? reNative : reHostCtor).test(value)) || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user