Update _.map to return an empty array when falsey values are passed.

Former-commit-id: 2f091fbeb140cbc0b8f3bd2df7a449a06239be0b
This commit is contained in:
John-David Dalton
2012-10-06 21:11:52 -07:00
parent c33825a904
commit 17e113dafb
4 changed files with 19 additions and 19 deletions

View File

@@ -1256,7 +1256,7 @@
});
if (isUnderscore) {
// remove compiled template cleanup from `_.template`
// remove "compiled template cleanup" from `_.template`
source = source.replace(/(?:\s*\/\/.*)*\n *source *=.+?isEvaluating.+?reEmptyStringLeading[\s\S]+?\);/, '');
source = removeVar(source, 'reEmptyStringLeading');
source = removeVar(source, 'reEmptyStringMiddle');