Skip to content

Commit

Permalink
Merge pull request #42680 from bernhardoj/fix/42438-blank-preview-att…
Browse files Browse the repository at this point in the history
…achment

Fix blank preview when opened URL of deleted file
  • Loading branch information
bondydaa authored May 29, 2024
2 parents f212bbb + 5e677ee commit 9c401e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Attachments/AttachmentCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function AttachmentCarousel({report, reportActions, parentReportActions, source,
const attachmentsFromReport = extractAttachmentsFromReport(parentReportAction, reportActions ?? undefined);

if (isEqual(attachments, attachmentsFromReport)) {
if (attachments.length === 0) {
setPage(-1);
setDownloadButtonVisibility?.(false);
}
return;
}

Expand Down

0 comments on commit 9c401e0

Please sign in to comment.