mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Use hasOwnProperty instead of objToString for the creation of reIsNative to avoid issues with core-js. [closes #1197]
This commit is contained in:
@@ -771,8 +771,8 @@
|
|||||||
|
|
||||||
/** Used to detect if a method is native. */
|
/** Used to detect if a method is native. */
|
||||||
var reIsNative = RegExp('^' +
|
var reIsNative = RegExp('^' +
|
||||||
escapeRegExp(objToString)
|
escapeRegExp(fnToString.call(hasOwnProperty))
|
||||||
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Native method references. */
|
/** Native method references. */
|
||||||
|
|||||||
Reference in New Issue
Block a user