diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 9b51de41095d..00e9aea7ad81 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -509,7 +509,8 @@ function getLastMessageTextForReport(report: OnyxEntry, lastActorDetails const lastActionName = lastReportAction?.actionName ?? ''; if (ReportUtils.isArchivedRoom(report)) { - const archiveReason = lastOriginalReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.CLOSED && lastOriginalReportAction?.originalMessage?.reason || CONST.REPORT.ARCHIVE_REASON.DEFAULT; + const archiveReason = + (lastOriginalReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.CLOSED && lastOriginalReportAction?.originalMessage?.reason) || CONST.REPORT.ARCHIVE_REASON.DEFAULT; switch (archiveReason) { case CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED: case CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY: