Skip to content

Commit

Permalink
Merge pull request #23778 from tienifr/fix/23380-wrong-translation-pa…
Browse files Browse the repository at this point in the history
…id-message-after-deleting-last-message

Fix: Wrong translation of `paid` in LHN after deleting last message
  • Loading branch information
johnmlee101 authored Jul 28, 2023
2 parents 7754c7a + 1c31ef5 commit fed84b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,10 @@ function getAllReportErrors(report, reportActions) {
* @returns {String}
*/
function getLastMessageTextForReport(report) {
const lastReportAction = lastReportActions[report.reportID];
const lastReportAction = _.find(
allSortedReportActions[report.reportID],
(reportAction, key) => ReportActionUtils.shouldReportActionBeVisible(reportAction, key) && reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
);
let lastMessageTextFromReport = '';

if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml, translationKey: report.lastMessageTranslationKey})) {
Expand Down

0 comments on commit fed84b5

Please sign in to comment.