Skip to content

Commit

Permalink
Update src/libs/actions/TaxRate.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Martins <luacmartins@gmail.com>
  • Loading branch information
filip-solecki and luacmartins authored Mar 25, 2024
1 parent 062d53c commit a883c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/TaxRate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function deletePolicyTaxes(policyID: string, taxesToDelete: string[]) {
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`];
const policyTaxRates = policy?.taxRates?.taxes;
const foreignTaxDefault = policy?.taxRates?.foreignTaxDefault;
const firstTaxID = Object.keys(policy?.taxRates?.taxes ?? {}).sort((a, b) => a.localeCompare(b))[0];
const firstTaxID = Object.keys(policyTaxRates ?? {}).sort((a, b) => a.localeCompare(b))[0];

if (!policyTaxRates) {
console.debug('Policy or tax rates not found');
Expand Down

0 comments on commit a883c05

Please sign in to comment.