mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
Check matrix client exists when stopping
This commit is contained in:
parent
7044410a13
commit
cdd73e6e1f
1 changed files with 3 additions and 1 deletions
|
@ -52,7 +52,9 @@ class ActiveWidgetStore extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
if (MatrixClientPeg.get()) {
|
||||||
MatrixClientPeg.get().removeListener('RoomState.events', this.onRoomStateEvents);
|
MatrixClientPeg.get().removeListener('RoomState.events', this.onRoomStateEvents);
|
||||||
|
}
|
||||||
this._capsByWidgetId = {};
|
this._capsByWidgetId = {};
|
||||||
this._widgetMessagingByWidgetId = {};
|
this._widgetMessagingByWidgetId = {};
|
||||||
this._roomIdByWidgetId = {};
|
this._roomIdByWidgetId = {};
|
||||||
|
|
Loading…
Reference in a new issue