mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +00:00
Ensure icon component state is reset (#463)
This commit is contained in:
@@ -42,6 +42,10 @@ export class IconComponent implements OnChanges {
|
||||
}
|
||||
|
||||
async ngOnChanges() {
|
||||
// Components may be re-used when using cdk-virtual-scroll. Which puts the component in a weird state,
|
||||
// to avoid this we reset all state variables.
|
||||
this.image = null;
|
||||
this.fallbackImage = null;
|
||||
this.imageEnabled = !(await this.stateService.get<boolean>(ConstantsService.disableFaviconKey));
|
||||
this.load();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user