Ensure _.compose returns a noop function when no arguments are provided.

This commit is contained in:
John-David Dalton
2014-06-21 23:49:50 -07:00
parent 2f1346fefa
commit a3049b6f94
2 changed files with 14 additions and 0 deletions

View File

@@ -5372,6 +5372,9 @@
funcsLength = funcs.length,
length = funcsLength;
if (!length) {
return function() {};
}
while (length--) {
if (!isFunction(funcs[length])) {
throw new TypeError(funcErrorText);