From 846bde35ff2ff264ef4db668bf8f8c18237facad Mon Sep 17 00:00:00 2001 From: jdalton Date: Mon, 11 May 2015 10:31:38 -0700 Subject: [PATCH] Use `hasOwnProperty` instead of `objToString` for the creation of `reIsNative` to avoid issues with core-js. [closes #1197] --- lodash.src.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 88b3d7231..0464191dd 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -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. */