Skip to content

Commit

Permalink
Merge pull request #17449 from sobitneupane/sn_bug_16957_regression
Browse files Browse the repository at this point in the history
Fix null issue in lastMessageText
  • Loading branch information
pecanoro authored Apr 14, 2023
2 parents ea3d656 + 47d17ab commit 0c4e29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function getOptionData(reportID) {
if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) {
lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`;
} else {
lastMessageTextFromReport = _.get(report, 'lastMessageText', '');
lastMessageTextFromReport = report ? report.lastMessageText || '' : '';
}

// If the last actor's details are not currently saved in Onyx Collection,
Expand Down

0 comments on commit 0c4e29d

Please sign in to comment.