Skip to content

Commit

Permalink
Fix unrelated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jul 12, 2023
1 parent fa3678f commit 1a7bbcf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import * as Welcome from './Welcome';
import * as PersonalDetailsUtils from '../PersonalDetailsUtils';
import SidebarUtils from '../SidebarUtils';
import * as OptionsListUtils from '../OptionsListUtils';
import * as Localize from '../Localize';

let currentUserAccountID;
Onyx.connect({
Expand Down Expand Up @@ -243,7 +244,14 @@ function addActions(reportID, text = '', file) {

const currentTime = DateUtils.getDBTime();

const prevVisibleMessageText = ReportActionsUtils.getLastVisibleMessageText(reportID);
const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(reportID);
let prevVisibleMessageText;
if (lastVisibleMessage.lastMessageTranslationKey) {
prevVisibleMessageText = Localize.translateLocal(prevVisibleMessageText);
} else {
prevVisibleMessageText = lastVisibleMessage.lastMessageText;
}

const lastCommentText = ReportUtils.formatReportLastMessageText(lastAction.message[0].text);

const optimisticReport = {
Expand Down

0 comments on commit 1a7bbcf

Please sign in to comment.