Skip to content

Commit

Permalink
fix: current report does not show in lhn under workspace filter
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Mar 1, 2024
1 parent 48657b4 commit 5312bca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ function getOrderedReportIDs(
const archivedReports: Report[] = [];

if (currentPolicyID || policyMemberAccountIDs.length > 0) {
reportsToDisplay = reportsToDisplay.filter((report) => ReportUtils.doesReportBelongToWorkspace(report, policyMemberAccountIDs, currentPolicyID));
reportsToDisplay = reportsToDisplay.filter(
(report) => report.reportID === currentReportId || ReportUtils.doesReportBelongToWorkspace(report, policyMemberAccountIDs, currentPolicyID),
);
}
// There are a few properties that need to be calculated for the report which are used when sorting reports.
reportsToDisplay.forEach((report) => {
Expand Down

0 comments on commit 5312bca

Please sign in to comment.