Skip to content

Commit 29111e5

Browse files
committed
fix: Update react-pdf worker cdn src
1 parent 0c9c1ab commit 29111e5

File tree

1 file changed

+1
-1
lines changed
  • packages/react-notion-x/src/third-party

1 file changed

+1
-1
lines changed

packages/react-notion-x/src/third-party/pdf.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react'
22
import { Document, Page, pdfjs } from 'react-pdf'
33

44
// ensure pdfjs can find its worker script regardless of how react-notion-x is bundled
5-
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`
5+
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`
66

77
export function Pdf({ file, ...rest }: { file: string }) {
88
const [numPages, setNumPages] = React.useState<number>(0)

0 commit comments

Comments
 (0)