diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 93844f5ba886..4cd7a81e23b4 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1471,7 +1471,8 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, curr // Exclude reports that have no data because there wouldn't be anything to show in the option item. // This can happen if data is currently loading from the server or a report is in various stages of being created. - if (!report || !report.reportID || !report.participants || (_.isEmpty(report.participants) && !isPublicRoom(report)) || isIOUReport(report)) { + // This can also happen for anyone accessing a public room or archived room for which they don't have access to the underlying policy. + if (!report || !report.reportID || !report.participants || (_.isEmpty(report.participants) && !isPublicRoom(report) && !isArchivedRoom(report)) || isIOUReport(report)) { return false; } diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 5fc03ab77e67..e3d33b5f4afd 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -252,7 +252,7 @@ function getOptionData(reportID) { const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat; const subtitle = ReportUtils.getChatRoomSubtitle(report, policies); - const login = Str.removeSMSDomain(personalDetail.login || ''); + const login = Str.removeSMSDomain(lodashGet(personalDetail, 'login', '')); const formattedLogin = Str.isSMSLogin(login) ? LocalePhoneNumber.formatPhoneNumber(login) : login; // We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.