diff --git a/build.js b/build.js index ca7f0160e..f1195c40a 100755 --- a/build.js +++ b/build.js @@ -1644,8 +1644,8 @@ source = removeFunction(source, 'isArguments'); source = source.replace(getIsArgumentsFallback(source), function(match) { return snippet + '\n' + match - .replace(/\bisArguments\b/g, 'lodash.$&') - .replace(/\bnoArgsClass\b/g, '!lodash.isArguments(arguments)'); + .replace(/isArguments/g, 'lodash.$&') + .replace(/noArgsClass/g, '!lodash.isArguments(arguments)'); }); }()); @@ -1719,6 +1719,11 @@ return match.replace(/(?:\s*\/\/.*)*\n( *)if *\(noCharByIndex[\s\S]+?\n\1}/, ''); }); + // replace `createFunction` with `Function` in `_.template` + source = source.replace(matchFunction(source, 'template'), function(match) { + return match.replace(/createFunction/g, 'Function'); + }); + source = removeVar(source, 'extendIteratorOptions'); source = removeVar(source, 'iteratorTemplate'); source = removeVar(source, 'noCharByIndex');