From 1467b6de267e150bb45491be7250987b6aad2aa7 Mon Sep 17 00:00:00 2001 From: Vito Date: Fri, 29 Oct 2021 22:35:42 +0100 Subject: [PATCH] =?UTF-8?q?[ADF-5173]=20-=20removed=20takeUntil=20as=20it?= =?UTF-8?q?=20was=20pointless=20and=20preventing=20the=E2=80=A6=20(#7333)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ADF-5173] - removed takeUntil as it was pointless and preventing the pdfjs to be closed correctly * [ACA-3847] - fixed unused import --- lib/core/viewer/components/pdf-viewer.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/viewer/components/pdf-viewer.component.ts b/lib/core/viewer/components/pdf-viewer.component.ts index b54ba3eb0c..8eaddbbf47 100644 --- a/lib/core/viewer/components/pdf-viewer.component.ts +++ b/lib/core/viewer/components/pdf-viewer.component.ts @@ -34,7 +34,7 @@ import { PdfPasswordDialogComponent } from './pdf-viewer-password-dialog'; import { AppConfigService } from './../../app-config/app-config.service'; import { PDFDocumentProxy, PDFSource } from 'pdfjs-dist'; import { Subject } from 'rxjs'; -import { catchError, delay, takeUntil } from 'rxjs/operators'; +import { catchError, delay } from 'rxjs/operators'; declare const pdfjsLib: any; declare const pdfjsViewer: any; @@ -121,7 +121,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { this.onPageRendered = this.onPageRendered.bind(this); this.randomPdfId = this.generateUuid(); this.currentScale = this.getUserScaling(); - this.pdfjsWorkerDestroy$.pipe(catchError(() => null), delay(700), takeUntil(this.onDestroy$)).subscribe(() => this.destroyPdJsWorker()); + this.pdfjsWorkerDestroy$.pipe(catchError(() => null), delay(700)).subscribe(() => this.destroyPdJsWorker()); } getUserScaling(): number {