You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user