Skip to content

Commit

Permalink
optimize more
Browse files Browse the repository at this point in the history
  • Loading branch information
aimane-chnaif committed Mar 21, 2024
1 parent b32ce2f commit 0d41219
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ function getOrderedReportIDs(

const parentReportActionsKey = `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`;
const parentReportActions = allReportActions?.[parentReportActionsKey];
const reportActions = ReportActionsUtils.getAllReportActions(report.reportID);
const reportActionsKey = `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`;
const reportActions = allReportActions?.[reportActionsKey];
const parentReportAction = parentReportActions?.find((action) => action && action?.reportActionID === report.parentReportActionID);
const doesReportHaveViolations =
betas.includes(CONST.BETAS.VIOLATIONS) && !!parentReportAction && ReportUtils.doesTransactionThreadHaveViolations(report, transactionViolations, parentReportAction);
Expand Down

0 comments on commit 0d41219

Please sign in to comment.