mirror of https://github.com/vector-im/riot-web
Use else if
Maybe it looks a little nicer, I don't know Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
a707524aad
commit
d68afcc4ce
|
@ -123,17 +123,15 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
action: "view_room",
|
action: "view_room",
|
||||||
room_id: roomId,
|
room_id: roomId,
|
||||||
});
|
});
|
||||||
|
} else if (space) {
|
||||||
|
defaultDispatcher.dispatch({
|
||||||
|
action: "view_room",
|
||||||
|
room_id: space.roomId,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (space) {
|
defaultDispatcher.dispatch({
|
||||||
defaultDispatcher.dispatch({
|
action: "view_home_page",
|
||||||
action: "view_room",
|
});
|
||||||
room_id: space.roomId,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
defaultDispatcher.dispatch({
|
|
||||||
action: "view_home_page",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// persist space selected
|
// persist space selected
|
||||||
|
|
Loading…
Reference in New Issue