mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Destroy old CommunityFilterConditions when they aren't needed
Fixes https://github.com/vector-im/riot-web/issues/13971
This commit is contained in:
parent
7549d7d98a
commit
db23aaad83
1 changed files with 5 additions and 0 deletions
|
@ -74,6 +74,11 @@ export class TagWatcher {
|
|||
this.store.removeFilter(filter);
|
||||
}
|
||||
|
||||
// Destroy any and all old filter conditions to prevent resource leaks
|
||||
for (const filter of this.filters.values()) {
|
||||
filter.destroy();
|
||||
}
|
||||
|
||||
this.filters = newFilters;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue