Skip to content

Commit

Permalink
Merge pull request #37484 from tienifr/fix/37469
Browse files Browse the repository at this point in the history
[CP Staging]Fix: App crashes when upload PDF
  • Loading branch information
MonilBhavsar authored Feb 29, 2024
2 parents 9230b0a + 07eb158 commit e4e98a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Attachments/AttachmentView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ function AttachmentView({
const encryptedSourceUrl = isAuthTokenRequired ? addEncryptedAuthTokenToURL(source) : source;

const onPDFLoadComplete = (path) => {
if (path && (transaction.transactionID || reportActionID)) {
CachedPDFPaths.add(transaction.transactionID || reportActionID, path);
const id = (transaction && transaction.transactionID) || reportActionID;
if (path && id) {
CachedPDFPaths.add(id, path);
}
if (!loadComplete) {
setLoadComplete(true);
Expand Down

0 comments on commit e4e98a2

Please sign in to comment.