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

(cherry picked from commit de87348)
  • Loading branch information
techievivek authored and OSBotify committed Oct 11, 2023
1 parent 2b2d154 commit 6b4e70c
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 6b4e70c

Please sign in to comment.