Skip to content

Commit

Permalink
Fix lint: use conditional check
Browse files Browse the repository at this point in the history
  • Loading branch information
MonilBhavsar committed Apr 5, 2024
1 parent 2ff4f16 commit 17c39e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/EditRequestPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const defaultProps = {
};

const getTaxAmount = (transactionAmount, transactionTaxCode, taxRates) => {
const percentage = (transactionTaxCode ? taxRates.taxes[transactionTaxCode]?.value : taxRates.defaultValue) || '';
const percentage = (transactionTaxCode && taxRates.taxes[transactionTaxCode] ? taxRates.taxes[transactionTaxCode].value : taxRates.defaultValue) || '';
return CurrencyUtils.convertToBackendAmount(Number.parseFloat(TransactionUtils.calculateTaxAmount(percentage, transactionAmount)));
};

Expand Down

0 comments on commit 17c39e4

Please sign in to comment.