aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-18 20:13:13 -0400
committerbobzel <zzzman@gmail.com>2025-03-18 20:13:13 -0400
commit2f06b1615fa1bcdc76efb170187dace6bed9d78e (patch)
treed277138a3f3c82a5ed0f4e518a5e42390d94942b /src
parentbd3b5ade4cad1a2322716cce811cce8db397d246 (diff)
from last
Diffstat (limited to 'src')
-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';