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

(cherry picked from commit 7aaa8c3)
  • Loading branch information
mountiny authored and OSBotify committed Dec 27, 2023
1 parent 22795f8 commit be1b2c9
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 be1b2c9

Please sign in to comment.