mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Fix _.createCallback perf regression.
Former-commit-id: a66821a2c4aa3bae626e19ef638a27689b96dc24
This commit is contained in:
7
build.js
7
build.js
@@ -1634,9 +1634,8 @@
|
||||
// remove `__bindData__` logic and `setBindData` function calls from `_.createCallback`
|
||||
source = source.replace(matchFunction(source, 'createCallback'), function(match) {
|
||||
return match
|
||||
.replace(/^( *)var bindData *=[\s\S]+?\n\1}\n/m, '')
|
||||
.replace(/\s*\|\|\s*!bindData\b/, '')
|
||||
.replace(/^( *)else if \(bindData[\s\S]+?\n\1}\n/m, '')
|
||||
.replace(/(?:\s*\/\/.*)\n( *)var bindData *=[\s\S]+?\n\1}/, '')
|
||||
.replace(/(?:\s*\/\/.*)\n( *)if *\(bindData[\s\S]+?\n\1}/, '');
|
||||
});
|
||||
|
||||
return source;
|
||||
@@ -2729,7 +2728,7 @@
|
||||
}
|
||||
if (isLegacy || isMobile || isUnderscore) {
|
||||
_.each(['createBound', 'createCallback'], function(funcName) {
|
||||
funcDependencyMap[funcName] = _.without(funcDependencyMap[funcName], 'bind', 'setBindData');
|
||||
funcDependencyMap[funcName] = _.without(funcDependencyMap[funcName], 'setBindData');
|
||||
});
|
||||
}
|
||||
if (_.contains(plusFuncs, 'chain') == !isUnderscore) {
|
||||
|
||||
Reference in New Issue
Block a user