mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
Merge pull request #2584 from matrix-org/bwindels/fixrelogincustomtags
Fix: logging in again breaks CustomRoomTagStore
This commit is contained in:
@@ -48,7 +48,7 @@ class CustomRoomTagStore extends EventEmitter {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
// Initialise state
|
// Initialise state
|
||||||
this._state = {tags: this._getUpdatedTags()};
|
this._state = {tags: {}};
|
||||||
|
|
||||||
this._roomListStoreToken = RoomListStore.addListener(() => {
|
this._roomListStoreToken = RoomListStore.addListener(() => {
|
||||||
this._setState({tags: this._getUpdatedTags()});
|
this._setState({tags: this._getUpdatedTags()});
|
||||||
@@ -113,7 +113,8 @@ class CustomRoomTagStore extends EventEmitter {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'on_logged_out': {
|
case 'on_logged_out': {
|
||||||
this._state = {};
|
// we assume to always have a tags object in the state
|
||||||
|
this._state = {tags: {}};
|
||||||
if (this._roomListStoreToken) {
|
if (this._roomListStoreToken) {
|
||||||
this._roomListStoreToken.remove();
|
this._roomListStoreToken.remove();
|
||||||
this._roomListStoreToken = null;
|
this._roomListStoreToken = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user