diff --git a/lib/data-utils.ts b/lib/data-utils.ts index 5e057d1..a851d38 100644 --- a/lib/data-utils.ts +++ b/lib/data-utils.ts @@ -397,7 +397,7 @@ export const saveExpense = async (expense: T.Expense) => { (_expense) => _expense.description === expense.description, ); - if (matchingExpense.budget) { + if (matchingExpense && matchingExpense.budget) { expense.budget = matchingExpense.budget; } }