Skip to content

Commit

Permalink
Merge pull request #19127 from Expensify/cmartins-fixReportHeader
Browse files Browse the repository at this point in the history
Fallback on report

(cherry picked from commit 3e5d81b)
  • Loading branch information
luacmartins authored and OSBotify committed May 17, 2023
1 parent 4e273de commit 98389d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const HeaderView = (props) => {
const isChatRoom = ReportUtils.isChatRoom(props.report);
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(props.report);
const isTaskReport = ReportUtils.isTaskReport(props.report);
const reportHeaderData = (isTaskReport || !isThread) && !_.isEmpty(props.parentReport) ? props.parentReport : props.report;
const reportHeaderData = (isTaskReport || !isThread) && props.report.parentReportID ? props.parentReport : props.report;
const title = ReportUtils.getReportName(reportHeaderData);
const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData, props.parentReport);
const isConcierge = participants.length === 1 && _.contains(participants, CONST.EMAIL.CONCIERGE);
Expand Down Expand Up @@ -239,7 +239,7 @@ export default compose(
canEvict: false,
},
parentReport: {
key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`,
key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID || report.reportID}`,
},
}),
)(HeaderView);

0 comments on commit 98389d4

Please sign in to comment.