Skip to content

Commit

Permalink
Merge pull request #29277 from aimane-chnaif/fix-29088
Browse files Browse the repository at this point in the history
fix crash when first open contact profile page
  • Loading branch information
techievivek authored Oct 11, 2023
2 parents 7c04518 + b3b2306 commit de87348
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/ProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,11 @@ export default compose(
report: {
key: ({route, session}) => {
const accountID = Number(lodashGet(route.params, 'accountID', 0));
if (Number(session.accountID) === accountID || Session.isAnonymousUser()) {
const reportID = lodashGet(ReportUtils.getChatByParticipants([accountID]), 'reportID', '');
if (Number(session.accountID) === accountID || Session.isAnonymousUser() || !reportID) {
return null;
}
return `${ONYXKEYS.COLLECTION.REPORT}${lodashGet(ReportUtils.getChatByParticipants([accountID]), 'reportID', '')}`;
return `${ONYXKEYS.COLLECTION.REPORT}${reportID}`;
},
},
}),
Expand Down

0 comments on commit de87348

Please sign in to comment.