From 8da0141cac767c7ac2d1dfe224dbb0db55e025a2 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 19 May 2013 00:37:40 -0700 Subject: [PATCH] Fix `legacy include=defer` build test. Former-commit-id: 49d0598ad3a979796cd07b6819c0aa08642c93a1 --- build.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.js b/build.js index 4c061c432..fe1f2d22b 100755 --- a/build.js +++ b/build.js @@ -1862,6 +1862,12 @@ dependencyMap.toArray.push('isArray', 'map'); } + _.each(['debounce', 'throttle'], function(methodName) { + if (!useLodashMethod(methodName)) { + dependencyMap[methodName] = []; + } + }); + _.each(['max', 'min'], function(methodName) { if (!useLodashMethod(methodName)) { dependencyMap[methodName] = _.without(dependencyMap[methodName], 'isArray', 'isString'); @@ -1997,7 +2003,7 @@ // replace `_.isPlainObject` with `shimIsPlainObject` source = source.replace( matchFunction(source, 'isPlainObject').replace(/[\s\S]+?var isPlainObject *= */, ''), - matchFunction(source, 'shimIsPlainObject').replace(/[\s\S]+?function shimIsPlainObject/, 'function') + matchFunction(source, 'shimIsPlainObject').replace(/[\s\S]+?function shimIsPlainObject/, 'function').replace(/\s*$/, '') ); source = removeFunction(source, 'shimIsPlainObject');