Skip to content

Commit

Permalink
Guard against crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Santhosh-Sellavel authored Oct 4, 2023
1 parent b739088 commit d26e56b
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 @@ -1550,7 +1550,7 @@ function getReportPreviewMessage(report, reportAction = {}, shouldConsiderReceip
// A settled report preview message can come in three formats "paid ... elsewhere" or "paid ... with Expensify"
let translatePhraseKey = 'iou.paidElsewhereWithAmount';
if (
_.contains([CONST.IOU.PAYMENT_TYPE.VBBA, CONST.IOU.PAYMENT_TYPE.EXPENSIFY], reportAction.originalMessage.paymentType) ||
_.contains([CONST.IOU.PAYMENT_TYPE.VBBA, CONST.IOU.PAYMENT_TYPE.EXPENSIFY], lodashGet(reportAction, 'originalMessage.paymentType', '')) ||
reportActionMessage.match(/ (with Expensify|using Expensify)$/)
) {
translatePhraseKey = 'iou.paidWithExpensifyWithAmount';
Expand Down

0 comments on commit d26e56b

Please sign in to comment.