Skip to content

Commit

Permalink
Merge pull request #48940 from Expensify/cmartins-fixTrackedExpenses
Browse files Browse the repository at this point in the history
Fix tracked expenses
  • Loading branch information
stitesExpensify authored Sep 11, 2024
2 parents 6890d1e + 14a9f8b commit 5327409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ const CONST = {
},
MAX_COUNT_BEFORE_FOCUS_UPDATE: 30,
MIN_INITIAL_REPORT_ACTION_COUNT: 15,
UNREPORTED_REPORTID: '0',
SPLIT_REPORTID: '-2',
ACTIONS: {
LIMIT: 50,
Expand Down
3 changes: 2 additions & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ function Search({queryJSON}: SearchProps) {
};

const openReport = (item: TransactionListItemType | ReportListItemType | ReportActionListItemType) => {
let reportID = SearchUtils.isTransactionListItemType(item) && !item.isFromOneTransactionReport ? item.transactionThreadReportID : item.reportID;
const isFromSelfDM = item.reportID === CONST.REPORT.UNREPORTED_REPORTID;
let reportID = SearchUtils.isTransactionListItemType(item) && (!item.isFromOneTransactionReport || isFromSelfDM) ? item.transactionThreadReportID : item.reportID;

if (!reportID) {
return;
Expand Down

0 comments on commit 5327409

Please sign in to comment.