From 3e79135f5b115d5f1c79676f8525bfc921145499 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 2 Oct 2024 14:57:49 +0700 Subject: [PATCH] fix: App crashes after selecting rate --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index d244eefa99fd..d4479b01c897 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -3543,7 +3543,7 @@ function getModifiedExpenseOriginalMessage( const didTaxCodeChange = 'taxCode' in transactionChanges; if (didTaxCodeChange && !didAmountOrCurrencyChange) { originalMessage.oldTaxRate = policy?.taxRates?.taxes[TransactionUtils.getTaxCode(oldTransaction)]?.value; - originalMessage.taxRate = transactionChanges?.taxCode && policy?.taxRates?.taxes[transactionChanges?.taxCode].value; + originalMessage.taxRate = transactionChanges?.taxCode && policy?.taxRates?.taxes[transactionChanges?.taxCode]?.value; } // We only want to display a tax amount update system message when tax amount is updated by user.