mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Exclude Lo-Dash methods from getVars results and correct varMap check.
Former-commit-id: 793bc5294ada8f765928aa9e78e83bc535eb44df
This commit is contained in:
6
build.js
6
build.js
@@ -1005,7 +1005,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all variables defined outside of Lo-Dash methods.
|
||||
* Creates a sorted array of all variables defined outside of Lo-Dash methods.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
@@ -1025,7 +1025,7 @@
|
||||
result.push(varA || varB || varC);
|
||||
});
|
||||
|
||||
return _.uniq(result).sort();
|
||||
return _.without.apply(_, [_.uniq(result)].concat(allMethods)).sort();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3477,7 +3477,7 @@
|
||||
});
|
||||
|
||||
var varName = varNames[0];
|
||||
if (varMap[varName] < 2) {
|
||||
if (!varMap[varName]) {
|
||||
source = removeVar(source, varName);
|
||||
}
|
||||
varNames.shift();
|
||||
|
||||
Reference in New Issue
Block a user