We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d1fdd61 + 62f1566 commit 84ad762Copy full SHA for 84ad762
1 file changed
src/app/shared/theme-support/themed.component.ts
@@ -99,6 +99,9 @@ export abstract class ThemedComponent<T extends object> implements AfterViewInit
99
}
100
101
initComponentInstance(changes?: SimpleChanges) {
102
+ if (hasValue(this.themeSub)) {
103
+ this.themeSub.unsubscribe();
104
+ }
105
this.themeSub = this.themeService?.getThemeName$().subscribe(() => {
106
this.renderComponentInstance(changes);
107
});
0 commit comments