mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +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
|
* @private
|
||||||
* @param {String} source The source to process.
|
* @param {String} source The source to process.
|
||||||
@@ -1025,7 +1025,7 @@
|
|||||||
result.push(varA || varB || varC);
|
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];
|
var varName = varNames[0];
|
||||||
if (varMap[varName] < 2) {
|
if (!varMap[varName]) {
|
||||||
source = removeVar(source, varName);
|
source = removeVar(source, varName);
|
||||||
}
|
}
|
||||||
varNames.shift();
|
varNames.shift();
|
||||||
|
|||||||
Reference in New Issue
Block a user