You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Check matrix client exists when stopping
This commit is contained in:
@@ -52,7 +52,9 @@ class ActiveWidgetStore extends EventEmitter {
|
||||
}
|
||||
|
||||
stop() {
|
||||
MatrixClientPeg.get().removeListener('RoomState.events', this.onRoomStateEvents);
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener('RoomState.events', this.onRoomStateEvents);
|
||||
}
|
||||
this._capsByWidgetId = {};
|
||||
this._widgetMessagingByWidgetId = {};
|
||||
this._roomIdByWidgetId = {};
|
||||
|
||||
Reference in New Issue
Block a user