Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function IOURequestStepConfirmation({
// the image ceases to exist. The best way for the user to recover from this is to start over from the start of the request process.
// skip this in case user is moving the transaction as the receipt path will be valid in that case
useEffect(() => {
let newReceiptFiles = {};
let newReceiptFiles: Record<string, Receipt> = {};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FitseTLT Can you please raise a quick PR updating the type for the setReceiptFiles useState too.

let isScanFilesCanBeRead = true;

Promise.all(
Expand All @@ -388,7 +388,9 @@ function IOURequestStepConfirmation({
const isLocalFile = isLocalFileFileUtils(itemReceiptPath);

if (!isLocalFile) {
newReceiptFiles = {...newReceiptFiles, [item.transactionID]: item.receipt};
if (item.receipt) {
newReceiptFiles = {...newReceiptFiles, [item.transactionID]: item.receipt};
Comment thread
FitseTLT marked this conversation as resolved.
}
return;
}

Expand Down
Loading