From d26e56bfae40dc53315943bd76eb54bb596fc834 Mon Sep 17 00:00:00 2001 From: Santhosh Sellavel <85645967+Santhosh-Sellavel@users.noreply.github.com> Date: Wed, 4 Oct 2023 23:30:58 +0530 Subject: [PATCH] Guard against crashes --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 647af48c6039..066bb68d1f77 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -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';