From 890602a8e3714bcdab0fd19ca5ce2e954a458bfd Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 19 Sep 2024 07:51:51 +0900 Subject: [PATCH] reuse variable --- src/components/SelectionList/Search/TransactionListItemRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SelectionList/Search/TransactionListItemRow.tsx b/src/components/SelectionList/Search/TransactionListItemRow.tsx index f19105bd56dd..7804ffa047f4 100644 --- a/src/components/SelectionList/Search/TransactionListItemRow.tsx +++ b/src/components/SelectionList/Search/TransactionListItemRow.tsx @@ -83,7 +83,7 @@ function ReceiptCell({transactionItem}: TransactionCellProps) { let source = transactionItem?.receipt?.source ?? ''; if (source) { - const filename = getFileName(transactionItem?.receipt?.source ?? ''); + const filename = getFileName(source); const receiptURIs = getThumbnailAndImageURIs(transactionItem, null, filename); const isReceiptPDF = Str.isPDF(filename); source = tryResolveUrlFromApiRoot(isReceiptPDF && !receiptURIs.isLocalFile ? receiptURIs.thumbnail ?? '' : receiptURIs.image ?? '');