From 96e757d6bd185bf120087917943fdd90b0e8f0ee Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 9 Sep 2024 15:58:03 -0600 Subject: [PATCH] fix deleted message on search --- src/libs/SearchUtils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/SearchUtils.ts b/src/libs/SearchUtils.ts index 1b1fcaee8682..21d1606bc838 100644 --- a/src/libs/SearchUtils.ts +++ b/src/libs/SearchUtils.ts @@ -18,6 +18,7 @@ import DateUtils from './DateUtils'; import {translateLocal} from './Localize'; import navigationRef from './Navigation/navigationRef'; import type {AuthScreensParamList, RootStackParamList, State} from './Navigation/types'; +import * as ReportActionsUtils from './ReportActionsUtils'; import * as searchParser from './SearchParser/searchParser'; import * as TransactionUtils from './TransactionUtils'; import * as UserUtils from './UserUtils'; @@ -200,6 +201,10 @@ function getReportActionsSections(data: OnyxTypes.SearchResults['data']): Report const reportActions = data[key]; for (const reportAction of Object.values(reportActions)) { const from = data.personalDetailsList?.[reportAction.accountID]; + if (ReportActionsUtils.isDeletedAction(reportAction)) { + // eslint-disable-next-line no-continue + continue; + } reportActionItems.push({ ...reportAction, from,