Skip to content

Commit e795aba

Browse files
Dimitar Fenerskiclaude
andcommitted
fix: suppress pdfjs-dist type mismatch in onLoadSuccess
react-pdf bundles its own pdfjs-dist with a divergent PDFDocumentProxy type. Add @ts-ignore on the single misaligned assignment. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6427b80 commit e795aba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/PdfViewer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export function PdfViewer({
238238
}} className="pdf-reader flex-1 overflow-y-auto bg-[#eee8d5] dark:bg-[#073642]">
239239
<Document
240240
file={file}
241+
// @ts-ignore — react-pdf bundles its own pdfjs-dist with a divergent PDFDocumentProxy type
241242
onLoadSuccess={handleLoadSuccess}
242243
externalLinkTarget="_blank"
243244
onItemClick={handleItemClick}

0 commit comments

Comments
 (0)