Destroy old CommunityFilterConditions when they aren't needed

Fixes https://github.com/vector-im/riot-web/issues/13971
This commit is contained in:
Travis Ralston 2020-06-09 15:22:37 -06:00
parent 7549d7d98a
commit db23aaad83

View file

@ -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;
}
};