[AAE-7241] fix eslint warnings for Extensions project (#7491)

* fix eslint warnings for Extensions project

* fix production mode compilation
This commit is contained in:
Denys Vuika
2022-02-08 12:05:33 +00:00
committed by GitHub
parent 8a03e7a2e7
commit 8048cbeb21
17 changed files with 109 additions and 134 deletions

View File

@@ -63,6 +63,13 @@ export class DynamicExtensionComponent implements OnChanges, OnDestroy {
this.proxy('ngOnChanges', changes);
}
ngOnDestroy() {
if (this.componentCreated()) {
this.componentRef.destroy();
this.componentRef = null;
}
}
private loadComponent() {
const componentType = this.extensions.getComponentById<ExtensionComponent>(this.id);
if (componentType) {
@@ -76,13 +83,6 @@ export class DynamicExtensionComponent implements OnChanges, OnDestroy {
}
}
ngOnDestroy() {
if (this.componentCreated()) {
this.componentRef.destroy();
this.componentRef = null;
}
}
private updateInstance() {
if (this.componentCreated()) {
this.componentRef.instance.data = this.data;