From 545cc1074c0d18a079440a45fbc7e7654bad6a53 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 16 Jun 2013 00:59:04 -0700 Subject: [PATCH] Exclude Lo-Dash methods from `getVars` results and correct `varMap` check. Former-commit-id: 793bc5294ada8f765928aa9e78e83bc535eb44df --- build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index e735f5de5..5e0678d0f 100755 --- a/build.js +++ b/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();