diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index b6e3552a95..9e59e8ea5c 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -570,6 +570,12 @@ module.exports = React.createClass({ const allRooms = RoomListSorter.mostRecentActivityFirst( MatrixClientPeg.get().getRooms(), ); + if (allRooms.length === 0) { + dis.dispatch({ + action: 'view_home_page', + }); + return; + } let roomIndex = -1; for (let i = 0; i < allRooms.length; ++i) { if (allRooms[i].roomId == this.state.currentRoomId) {