mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +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. */
|
||||
var reIsNative = RegExp('^' +
|
||||
escapeRegExp(objToString)
|
||||
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
escapeRegExp(fnToString.call(hasOwnProperty))
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Native method references. */
|
||||
|
||||
Reference in New Issue
Block a user