Fix _.reduce for modern and underscore builds.

This commit is contained in:
John-David Dalton
2013-12-24 12:47:22 -06:00
parent b338e76649
commit 2dab4ccf85
4 changed files with 5 additions and 5 deletions

View File

@@ -2548,7 +2548,7 @@
length = collection ? collection.length : 0;
if (typeof length == 'number') {
if (noaccum) {
if (noaccum && length) {
accumulator = collection[++index];
}
while (++index < length) {