Fix some NPEs
parent
b4fbc791bb
commit
a75fb98fbc
|
@ -262,7 +262,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
if (!space && SettingsStore.getValue("feature_spaces.all_rooms")) {
|
if (!space && SettingsStore.getValue("feature_spaces.all_rooms")) {
|
||||||
return new Set(this.matrixClient.getVisibleRooms().map(r => r.roomId));
|
return new Set(this.matrixClient.getVisibleRooms().map(r => r.roomId));
|
||||||
}
|
}
|
||||||
return this.spaceFilteredRooms.get(space.roomId) || new Set();
|
return this.spaceFilteredRooms.get(space?.roomId || HOME_SPACE) || new Set();
|
||||||
};
|
};
|
||||||
|
|
||||||
private rebuild = throttle(() => {
|
private rebuild = throttle(() => {
|
||||||
|
|
|
@ -30,6 +30,7 @@ export class SpaceWatcher {
|
||||||
|
|
||||||
constructor(private store: RoomListStoreClass) {
|
constructor(private store: RoomListStoreClass) {
|
||||||
if (!SettingsStore.getValue("feature_spaces.all_rooms")) {
|
if (!SettingsStore.getValue("feature_spaces.all_rooms")) {
|
||||||
|
this.filter = new SpaceFilterCondition();
|
||||||
this.updateFilter();
|
this.updateFilter();
|
||||||
store.addFilter(this.filter);
|
store.addFilter(this.filter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue