Skip to content

Commit

Permalink
Merge pull request #33642 from mkhutornyi/fix-33626
Browse files Browse the repository at this point in the history
[CP Staging] fix pdf not displaying on native
  • Loading branch information
mountiny authored Dec 27, 2023
2 parents 4a0fb97 + 432501a commit 7aaa8c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function ImageRenderer(props) {
const previewSource = tryResolveUrlFromApiRoot(htmlAttribs.src);
const source = tryResolveUrlFromApiRoot(isAttachmentOrReceipt ? htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE] : htmlAttribs.src);

const imageWidth = htmlAttribs['data-expensify-width'] ? parseInt(htmlAttribs['data-expensify-width'], 10) : undefined;
const imageHeight = htmlAttribs['data-expensify-height'] ? parseInt(htmlAttribs['data-expensify-height'], 10) : undefined;
const imageWidth = (htmlAttribs['data-expensify-width'] && parseInt(htmlAttribs['data-expensify-width'], 10)) || undefined;
const imageHeight = (htmlAttribs['data-expensify-height'] && parseInt(htmlAttribs['data-expensify-height'], 10)) || undefined;
const imagePreviewModalDisabled = htmlAttribs['data-expensify-preview-modal-disabled'] === 'true';

return imagePreviewModalDisabled ? (
Expand Down

0 comments on commit 7aaa8c3

Please sign in to comment.