mirror of https://github.com/vector-im/riot-web
Destroy old CommunityFilterConditions when they aren't needed
Fixes https://github.com/vector-im/riot-web/issues/13971pull/21833/head
parent
7549d7d98a
commit
db23aaad83
|
@ -74,6 +74,11 @@ export class TagWatcher {
|
||||||
this.store.removeFilter(filter);
|
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;
|
this.filters = newFilters;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue