Use hasOwnProperty instead of objToString for the creation of reIsNative to avoid issues with core-js. [closes #1197]

This commit is contained in:
jdalton
2015-05-11 10:31:38 -07:00
parent 69990ae226
commit 846bde35ff

View File

@@ -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. */