Don't try loading -ve room indices

This commit is contained in:
David Baker 2015-08-14 15:44:21 +01:00
parent 87feb6b076
commit 960a38fe43
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ module.exports = {
break;
}
}
roomIndex = (roomIndex + roomIndexDelta) % allRooms.length;
roomIndex = Math.max((roomIndex + roomIndexDelta) % allRooms.length, 0);
this.focusComposer = true;
this.setState({
currentRoom: allRooms[roomIndex].roomId