Use else if
Maybe it looks a little nicer, I don't know Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
a707524aad
commit
d68afcc4ce
1 changed files with 8 additions and 10 deletions
|
@ -123,8 +123,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
action: "view_room",
|
action: "view_room",
|
||||||
room_id: roomId,
|
room_id: roomId,
|
||||||
});
|
});
|
||||||
} else {
|
} else if (space) {
|
||||||
if (space) {
|
|
||||||
defaultDispatcher.dispatch({
|
defaultDispatcher.dispatch({
|
||||||
action: "view_room",
|
action: "view_room",
|
||||||
room_id: space.roomId,
|
room_id: space.roomId,
|
||||||
|
@ -134,7 +133,6 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
action: "view_home_page",
|
action: "view_home_page",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// persist space selected
|
// persist space selected
|
||||||
if (space) {
|
if (space) {
|
||||||
|
|
Loading…
Reference in a new issue