From ec4c6e140bd450565cc17120f1804755ff778bb5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 16 Jun 2013 10:23:39 -0700 Subject: [PATCH] Correct `getVars` filter in build.js Former-commit-id: 4be03b389d54ec360e56918c4d4ca2ad26f46f8a --- build.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build.js b/build.js index 5e0678d0f..4ba79342d 100755 --- a/build.js +++ b/build.js @@ -235,9 +235,6 @@ /** List of all methods */ var allMethods = _.keys(dependencyMap); - /** List of Lo-Dash methods */ - var lodashMethods = _.without(allMethods, 'findWhere'); - /** List of Backbone's Lo-Dash dependencies */ var backboneDependencies = [ 'bind', @@ -359,6 +356,9 @@ 'unescapeHtmlChar' ]; + /** List of Lo-Dash methods */ + var lodashMethods = _.without.apply(_, [allMethods].concat(privateMethods)); + /** List of Underscore methods */ var underscoreMethods = _.without.apply(_, [allMethods].concat(lodashOnlyMethods, privateMethods)); @@ -1025,7 +1025,7 @@ result.push(varA || varB || varC); }); - return _.without.apply(_, [_.uniq(result)].concat(allMethods)).sort(); + return _.without.apply(_, [_.uniq(result)].concat(lodashMethods)).sort(); } /** @@ -3100,8 +3100,7 @@ else { // remove methods from the build allMethods.forEach(function(otherName) { - if (!_.contains(buildMethods, otherName) && - !(otherName == 'findWhere' && !isUnderscore)) { + if (!_.contains(buildMethods, otherName)) { source = removeFunction(source, otherName); } });