Skip to content

Commit

Permalink
Merge pull request #37318 from Expensify/ionatan_duplicatemethod
Browse files Browse the repository at this point in the history
Remove duplicate logic, reuse method
  • Loading branch information
marcochavezf authored Feb 27, 2024
2 parents 9d49ee5 + a4ddebd commit 928d346
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject';
import {isCorporateCard, isExpensifyCard} from './CardUtils';
import DateUtils from './DateUtils';
import * as NumberUtils from './NumberUtils';
import {getCleanedTagName} from './PolicyUtils';
import type {OptimisticIOUReportAction} from './ReportUtils';

let allTransactions: OnyxCollection<Transaction> = {};
Expand Down Expand Up @@ -409,7 +410,7 @@ function getTag(transaction: OnyxEntry<Transaction>, tagIndex?: number): string
}

function getTagForDisplay(transaction: OnyxEntry<Transaction>, tagIndex?: number): string {
return getTag(transaction, tagIndex).replace(/[\\\\]:/g, ':');
return getCleanedTagName(getTag(transaction, tagIndex));
}

/**
Expand Down

0 comments on commit 928d346

Please sign in to comment.