Allow _.compose to be called without arguments. [closes #352]

This commit is contained in:
John-David Dalton
2013-09-17 19:39:07 -07:00
parent 0414bae820
commit d6aed16e7c
8 changed files with 13 additions and 8 deletions

View File

@@ -4649,7 +4649,12 @@
_.forEach(falsey, function(value, index) {
var pass = false;
try {
index ? func(value) : func();
if (index) {
func(value);
} else {
func();
pass = methodName == 'compose';
}
} catch(e) {
pass = true;
}