Skip to content

Commit

Permalink
Merge pull request #17988 from Expensify/jasper-fixUndefinedPersonalD…
Browse files Browse the repository at this point in the history
…etailsAccess

Fix undefined personal details access causing crash when calling getOptions
  • Loading branch information
Hayata Suenaga authored Apr 25, 2023
2 parents cb61143 + 3c2671a commit 295f30e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,10 @@ function createOption(logins, personalDetails, report, reportActions = {}, {
}
reportName = ReportUtils.getReportName(report, policies);
} else {
reportName = ReportUtils.getDisplayNameForParticipant(logins[0]);
result.keyForList = personalDetail.login;
result.alternateText = LocalePhoneNumber.formatPhoneNumber(personalDetail.login);
const login = logins[0];
reportName = ReportUtils.getDisplayNameForParticipant(login);
result.keyForList = login;
result.alternateText = LocalePhoneNumber.formatPhoneNumber(login);
}

result.isIOUReportOwner = ReportUtils.isIOUOwnedByCurrentUser(result, iouReports);
Expand Down

0 comments on commit 295f30e

Please sign in to comment.