diff --git a/projects/workers/src/worker/pipes/worker.pipe.ts b/projects/workers/src/worker/pipes/worker.pipe.ts index 112cea9..36a9fd7 100644 --- a/projects/workers/src/worker/pipes/worker.pipe.ts +++ b/projects/workers/src/worker/pipes/worker.pipe.ts @@ -14,7 +14,7 @@ export class WorkerPipe implements PipeTransform, OnDestroy { transform(value: T, fn: WorkerFunction): Observable { if (this.fn !== fn) { - this.terminate(); + this.terminateWorker(); this.initNewWorker(fn); } @@ -24,10 +24,10 @@ export class WorkerPipe implements PipeTransform, OnDestroy { } ngOnDestroy(): void { - this.terminate(); + this.terminateWorker(); } - private terminate() { + private terminateWorker() { if (this.worker) { this.worker.terminate(); }