mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 23:42:29 -05:00
models.js: Don't double-count when map-reducing report series
This commit is contained in:
parent
6ccf9208f0
commit
db7a60b292
@ -451,7 +451,7 @@ Series.prototype.mapReduce = function(mapFn, reduceFn) {
|
|||||||
for (var j = 0; j < childValues[0].length; j++) {
|
for (var j = 0; j < childValues[0].length; j++) {
|
||||||
reducedValues.push(childValues.reduce(function(accum, curr, i, arr) {
|
reducedValues.push(childValues.reduce(function(accum, curr, i, arr) {
|
||||||
return reduceFn(accum, arr[i][j]);
|
return reduceFn(accum, arr[i][j]);
|
||||||
}, childValues[0][j]));
|
}, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user