Skip to content

Commit

Permalink
Merge pull request Expensify#14033 from Expensify/cmartins-fixPartici…
Browse files Browse the repository at this point in the history
…pantsLength

[No QA] Check if report.participants exists
  • Loading branch information
Luke9389 authored Jan 11, 2023
2 parents ea6c52c + a2eb7a5 commit 5a09253
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,9 @@ function getIcons(report, personalDetails, policies, defaultIcon = null) {
}

const participantDetails = [];
for (let i = 0; i < report.participants.length; i++) {
const login = report.participants[i];
const participants = report.participants || [];
for (let i = 0; i < participants.length; i++) {
const login = participants[i];
participantDetails.push([
login,
lodashGet(personalDetails, [login, 'firstName'], ''),
Expand Down

0 comments on commit 5a09253

Please sign in to comment.