Skip to content

Commit

Permalink
fix(ReactPDF): set isEvalSupported to false (#10636)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Sep 3, 2024
1 parent 02ba0fc commit c8faca4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/PDFViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { throttle } from 'lodash';
import type { ComponentProps } from 'react';
import { FormattedMessage } from 'react-intl';
import { Document, Page, pdfjs } from 'react-pdf';
import styled from 'styled-components';
Expand All @@ -17,9 +18,10 @@ const DocumentContainer = styled.div`
}
`;

const options = {
const options: ComponentProps<typeof Document>['options'] = {
cMapUrl: `/static/cmaps/`,
cMapPacked: true,
isEvalSupported: false,
};

const PDFViewer = ({ pdfUrl, contentWrapperRef, errorTextColor = 'white.full', limitToPageWidth = true, ...props }) => {
Expand Down

0 comments on commit c8faca4

Please sign in to comment.