mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-27 17:18:04 +01:00
Ensure icon component state is reset (#463)
This commit is contained in:
parent
358260596b
commit
fe3a387724
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user