Skip to content

Commit

Permalink
fix: app crash when upload pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Feb 29, 2024
1 parent 3e74ddf commit ec2b94c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Attachments/AttachmentView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ function AttachmentView({
const encryptedSourceUrl = isAuthTokenRequired ? addEncryptedAuthTokenToURL(source) : source;

const onPDFLoadComplete = (path) => {
if (path && (transaction.transactionID || reportActionID)) {
CachedPDFPaths.add(transaction.transactionID || reportActionID, path);
if (path && (transaction?.transactionID ?? reportActionID)) {

Check failure on line 163 in src/components/Attachments/AttachmentView/index.js

View workflow job for this annotation

GitHub Actions / lint

ES2020 optional chaining is forbidden

Check failure on line 163 in src/components/Attachments/AttachmentView/index.js

View workflow job for this annotation

GitHub Actions / lint

ES2020 nullish coalescing operators are forbidden
CachedPDFPaths.add(transaction?.transactionID ?? reportActionID, path);

Check failure on line 164 in src/components/Attachments/AttachmentView/index.js

View workflow job for this annotation

GitHub Actions / lint

ES2020 optional chaining is forbidden

Check failure on line 164 in src/components/Attachments/AttachmentView/index.js

View workflow job for this annotation

GitHub Actions / lint

ES2020 nullish coalescing operators are forbidden
}
if (!loadComplete) {
setLoadComplete(true);
Expand Down

0 comments on commit ec2b94c

Please sign in to comment.