[FIX] remove unnecessary local, convert set to indexedseq
By default "iterating" a set will use a setseq which may still uniquify information if it finds duplicates (but it may not as it's lazy & al). #flatten conserves the seq type, so if there are two equal operation items amongst all selected operations they may get deduplicated, with the end result of operations disappearing in the final formatted result.
This commit is contained in:
parent
13761b4557
commit
4ae0fd613d
@ -99,10 +99,9 @@
|
||||
);
|
||||
},
|
||||
accounts: function() {
|
||||
var _this = this;
|
||||
var data = this.props.p.get('operations');
|
||||
|
||||
var totals = data.flatten(true).reduce(function (acc, op) {
|
||||
var totals = data.toIndexedSeq().flatten(true).reduce(function (acc, op) {
|
||||
return acc
|
||||
.updateIn([op.get('account'), 'debit'], function (d) {
|
||||
return (d || 0) + op.get('debit', zero)(data);
|
||||
|
Loading…
Reference in New Issue
Block a user