Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

fix: send null instead of undefined when clearing transaction notes (#91)

Leonardo Dias03b2ef236f38
diff --git a/frontend/src/components/transaction-dialog.tsx b/frontend/src/components/transaction-dialog.tsx
index bcf956ed..93fb8552 100644
--- a/frontend/src/components/transaction-dialog.tsx
+++ b/frontend/src/components/transaction-dialog.tsx
@@ -407,7 +407,7 @@ function TransactionForm({
? {
category_id: categoryId || null,
payee_id: payeeId || null,
- notes: notes.trim() || undefined,
+ notes: notes.trim() || null,
} as Partial<Transaction>
: {
description,
@@ -418,7 +418,7 @@ function TransactionForm({
category_id: categoryId || null,
payee_id: payeeId || null,
account_id: accountId || undefined,
- notes: notes.trim() || undefined,
+ notes: notes.trim() || null,
...fxFields,
} as Partial<Transaction>
const recurringData = isCreating && isRecurring