Skip to content
Snippets Groups Projects
Commit 4c9893f5 authored by jojohoch's avatar jojohoch
Browse files

Add missing unsubscription from isGeoGebraLoaded event

parent e4c25189
No related branches found
No related tags found
No related merge requests found
...@@ -48,9 +48,11 @@ export class GeometryComponent extends ElementComponent implements AfterViewInit ...@@ -48,9 +48,11 @@ export class GeometryComponent extends ElementComponent implements AfterViewInit
ngAfterViewInit(): void { ngAfterViewInit(): void {
this.externalResourceService.initializeGeoGebra(this.renderer); this.externalResourceService.initializeGeoGebra(this.renderer);
this.externalResourceService.isGeoGebraLoaded().subscribe((isLoaded: boolean) => { this.externalResourceService.isGeoGebraLoaded()
if (isLoaded) this.initApplet(); .pipe(takeUntil(this.ngUnsubscribe))
}); .subscribe((isLoaded: boolean) => {
if (isLoaded) this.initApplet();
});
} }
refresh(): void { refresh(): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment