mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Issue #209, fix reduce without a memo for arrays that are sparse at the beginning.
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
|
||||
}
|
||||
each(obj, function(value, index, list) {
|
||||
if (!initial && index === 0) {
|
||||
if (!initial) {
|
||||
memo = value;
|
||||
initial = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user