From 2f2ecaa61ee8606701080b6e7ec90a947eb8e9d1 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 7 Dec 2023 07:13:00 -0800 Subject: [PATCH] Fix: respect baseURI for pdfjs worker URL (#4865) --- src-ui/src/app/app.component.ts | 2 -- .../app/components/common/pdf-viewer/pdf-viewer.component.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src-ui/src/app/app.component.ts b/src-ui/src/app/app.component.ts index 28ce87929..58c439f9b 100644 --- a/src-ui/src/app/app.component.ts +++ b/src-ui/src/app/app.component.ts @@ -33,8 +33,6 @@ export class AppComponent implements OnInit, OnDestroy { private renderer: Renderer2, private permissionsService: PermissionsService ) { - let anyWindow = window as any - anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.js' this.settings.updateAppearanceSettings() } diff --git a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts index f9e7eb005..fa91c1edb 100644 --- a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts +++ b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts @@ -231,7 +231,7 @@ export class PdfViewerComponent private element: ElementRef, private ngZone: NgZone ) { - PDFJS.GlobalWorkerOptions['workerSrc'] = '/assets/js/pdf.worker.min.js' + PDFJS.GlobalWorkerOptions['workerSrc'] = 'assets/js/pdf.worker.min.js' } ngAfterViewChecked(): void {