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:
Šimon Brandner 2021-03-26 13:52:41 +01:00
parent a707524aad
commit d68afcc4ce
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -123,17 +123,15 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
action: "view_room",
room_id: roomId,
});
} else if (space) {
defaultDispatcher.dispatch({
action: "view_room",
room_id: space.roomId,
});
} else {
if (space) {
defaultDispatcher.dispatch({
action: "view_room",
room_id: space.roomId,
});
} else {
defaultDispatcher.dispatch({
action: "view_home_page",
});
}
defaultDispatcher.dispatch({
action: "view_home_page",
});
}
// persist space selected