Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Nov 22, 2023
1 parent ff1f241 commit b318996
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/loot-core/src/shared/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ function getSplit(transactions, parentIndex) {
export function ungroupTransactions(transactions) {
const x = transactions.reduce((list, parent) => {
const { subtransactions, ...trans } = parent;
const _subtransactions = subtransactions || [];

list.push(trans);

for (let i = 0; i < subtransactions?.length ?? 0; i++) {
list.push(subtransactions?.[i]);
for (let i = 0; i < _subtransactions.length; i++) {
list.push(_subtransactions[i]);
}
return list;
}, []);
Expand Down

0 comments on commit b318996

Please sign in to comment.