diff options
author | bobzel <zzzman@gmail.com> | 2025-03-18 20:13:13 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-18 20:13:13 -0400 |
commit | 2f06b1615fa1bcdc76efb170187dace6bed9d78e (patch) | |
tree | d277138a3f3c82a5ed0f4e518a5e42390d94942b | |
parent | bd3b5ade4cad1a2322716cce811cce8db397d246 (diff) |
from last
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
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'; |