Skip to content

Commit

Permalink
Fix when pressing Enter adds an extra split transaction when no split…
Browse files Browse the repository at this point in the history
… remains (#2144)

* Fix pressing enter adds split transaction when no split remains

* Added release notes

* Refactor to use find indstead of findIndex
  • Loading branch information
jasonmichalski authored Jan 6, 2024
1 parent 4d7cfab commit d203def
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,9 @@ export const TransactionTable = forwardRef((props, ref) => {
afterSave(() => {
const transactions = latestState.current.transactions;
const idx = transactions.findIndex(t => t.id === id);
const parent = transactionMap.get(transactions[idx]?.parent_id);
const parent = transactions.find(
t => t.id === transactions[idx]?.parent_id,
);

if (
isLastChild(transactions, idx) &&
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2144.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [jasonmichalski]
---

Fix when pressing Enter adds an extra split transaction when no split remains

0 comments on commit d203def

Please sign in to comment.