A local-first personal finance app
Fix when pressing Enter adds an extra split transaction when no split remains (#2144)
Jasond203def2309f
diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsxindex 6a9f5d6564..fe4549a1e0 100644--- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx@@ -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) &&diff --git a/upcoming-release-notes/2144.md b/upcoming-release-notes/2144.mdnew file mode 100644index 0000000000..d03b7b0ce7--- /dev/null+++ b/upcoming-release-notes/2144.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [jasonmichalski]+---++Fix when pressing Enter adds an extra split transaction when no split remains