From b32ce2f406494f909aa45efdd220483ac23f9663 Mon Sep 17 00:00:00 2001 From: aimane-chnaif Date: Thu, 21 Mar 2024 21:20:17 +1000 Subject: [PATCH] more optimization --- src/libs/SidebarUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index c4e8070b55a2..63b907a42e25 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -84,7 +84,7 @@ function getOrderedReportIDs( const parentReportActionsKey = `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`; const parentReportActions = allReportActions?.[parentReportActionsKey]; const reportActions = ReportActionsUtils.getAllReportActions(report.reportID); - const parentReportAction = parentReportActions?.find((action) => action && report && action?.reportActionID === report.parentReportActionID); + const parentReportAction = parentReportActions?.find((action) => action && action?.reportActionID === report.parentReportActionID); const doesReportHaveViolations = betas.includes(CONST.BETAS.VIOLATIONS) && !!parentReportAction && ReportUtils.doesTransactionThreadHaveViolations(report, transactionViolations, parentReportAction); const isHidden = report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;