handle unaliased room naming more sanely

This commit is contained in:
Matthew Hodgson 2016-03-23 11:50:38 +00:00
parent 8cbc8db1cb
commit 27ab79fd38
1 changed files with 2 additions and 2 deletions

View File

@ -112,8 +112,8 @@ module.exports = React.createClass({
var self = this;
var guestRead, guestJoin, perms;
for (var i = 0; i < rooms.length; i++) {
var alias = rooms[i].canonical_alias || (rooms[i].aliases ? rooms[i].aliases[0] : "Unnamed room");
var name = rooms[i].name || alias;
var alias = rooms[i].canonical_alias || (rooms[i].aliases ? rooms[i].aliases[0] : "");
var name = rooms[i].name || alias || "Unnamed room";
guestRead = null;
guestJoin = null;