mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Fix _.isFunction and _.isNative for Safari 8.
This commit is contained in:
@@ -7377,9 +7377,9 @@
|
||||
return typeof value == 'function' || false;
|
||||
}
|
||||
// fallback for older versions of Chrome and Safari
|
||||
if (isFunction(/x/)) {
|
||||
if (isFunction(/x/) || !Uint8Array || !isFunction(Uint8Array)) {
|
||||
isFunction = function(value) {
|
||||
return typeof value == 'function' && toString.call(value) == funcClass;
|
||||
return toString.call(value) == funcClass;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7461,7 +7461,7 @@
|
||||
* // => false
|
||||
*/
|
||||
function isNative(value) {
|
||||
if (isFunction(value)) {
|
||||
if (typeof value == 'function' || toString.call(value) == funcClass) {
|
||||
return reNative.test(fnToString.call(value));
|
||||
}
|
||||
return (value && typeof value == 'object' &&
|
||||
|
||||
Reference in New Issue
Block a user