Skip to content

Commit

Permalink
Merge pull request #19962 from therealsujitk/fix-19539
Browse files Browse the repository at this point in the history
Fix lastMessageText flickering in LHN due to leading newline character
  • Loading branch information
stitesExpensify authored Jun 5, 2023
2 parents 8a376c8 + 70250be commit 15dada7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ function canShowReportRecipientLocalTime(personalDetails, report, login) {
* @returns {String}
*/
function formatReportLastMessageText(lastMessageText) {
return Str.htmlDecode(String(lastMessageText)).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
return Str.htmlDecode(String(lastMessageText)).trim().replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
}

/**
Expand Down

0 comments on commit 15dada7

Please sign in to comment.