diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 9c5e437a874e..a979539f4b2d 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6163,7 +6163,7 @@ function getAllAncestorReportActions(report: Report | null | undefined): Ancesto const parentReport = getReport(parentReportID); const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, parentReportActionID ?? '0'); - if (!parentReportAction || ReportActionsUtils.isTransactionThread(parentReportAction)) { + if (!parentReportAction || ReportActionsUtils.isTransactionThread(parentReportAction) || ReportActionsUtils.isReportPreviewAction(parentReportAction)) { break; } @@ -6207,7 +6207,10 @@ function getAllAncestorReportActionIDs(report: Report | null | undefined, includ const parentReport = getReport(parentReportID); const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, parentReportActionID ?? '0'); - if (!parentReportAction || (!includeTransactionThread && ReportActionsUtils.isTransactionThread(parentReportAction))) { + if ( + !parentReportAction || + (!includeTransactionThread && (ReportActionsUtils.isTransactionThread(parentReportAction) || ReportActionsUtils.isReportPreviewAction(parentReportAction))) + ) { break; }