Skip to content

Commit

Permalink
reuse variable
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Sep 18, 2024
1 parent 2973264 commit 890602a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '');
Expand Down

0 comments on commit 890602a

Please sign in to comment.