mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Add proxyTag check to _.isFunction for Safari 10 support of the Proxy constructor. [closes #2689]
This commit is contained in:
@@ -95,6 +95,7 @@
|
|||||||
numberTag = '[object Number]',
|
numberTag = '[object Number]',
|
||||||
objectTag = '[object Object]',
|
objectTag = '[object Object]',
|
||||||
promiseTag = '[object Promise]',
|
promiseTag = '[object Promise]',
|
||||||
|
proxyTag = '[object Proxy]',
|
||||||
regexpTag = '[object RegExp]',
|
regexpTag = '[object RegExp]',
|
||||||
setTag = '[object Set]',
|
setTag = '[object Set]',
|
||||||
stringTag = '[object String]',
|
stringTag = '[object String]',
|
||||||
@@ -11570,7 +11571,7 @@
|
|||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||||
return tag == funcTag || tag == genTag;
|
return tag == funcTag || tag == genTag || tag == proxyTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user