Skip to content

Commit 5327409

Browse files
Merge pull request #48940 from Expensify/cmartins-fixTrackedExpenses
Fix tracked expenses
2 parents 6890d1e + 14a9f8b commit 5327409

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/CONST.ts

+1
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ const CONST = {
773773
},
774774
MAX_COUNT_BEFORE_FOCUS_UPDATE: 30,
775775
MIN_INITIAL_REPORT_ACTION_COUNT: 15,
776+
UNREPORTED_REPORTID: '0',
776777
SPLIT_REPORTID: '-2',
777778
ACTIONS: {
778779
LIMIT: 50,

src/components/Search/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ function Search({queryJSON}: SearchProps) {
281281
};
282282

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

286287
if (!reportID) {
287288
return;

0 commit comments

Comments
 (0)