aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index f6f319831..27dffa93b 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -3,7 +3,7 @@ import { observer } from 'mobx-react';
import * as Pdfjs from 'pdfjs-dist';
import * as PDFJSViewer from 'pdfjs-dist/web/pdf_viewer.mjs';
import { GlobalWorkerOptions } from 'pdfjs-dist/build/pdf.mjs';
-if (typeof window !== 'undefined' && 'Worker' in window) {
+if (window?.Worker) {
GlobalWorkerOptions.workerSrc = 'files/pdf.worker.min.mjs';
}
export * from 'pdfjs-dist/build/pdf.mjs';