mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Stop listening to account data when the stickerpicker is unmounted
Fixes https://github.com/vector-im/riot-web/issues/8994
This commit is contained in:
parent
b2f4de4488
commit
b5ffd4a538
1 changed files with 3 additions and 0 deletions
|
@ -103,6 +103,9 @@ export default class Stickerpicker extends React.Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const client = MatrixClientPeg.get();
|
||||
if (client) client.removeListener('accountData', this._updateWidget);
|
||||
|
||||
window.removeEventListener('resize', this._onResize);
|
||||
if (this.dispatcherRef) {
|
||||
dis.unregister(this.dispatcherRef);
|
||||
|
|
Loading…
Reference in a new issue