handle unaliased room naming more sanely
This commit is contained in:
parent
8cbc8db1cb
commit
27ab79fd38
|
@ -112,8 +112,8 @@ module.exports = React.createClass({
|
||||||
var self = this;
|
var self = this;
|
||||||
var guestRead, guestJoin, perms;
|
var guestRead, guestJoin, perms;
|
||||||
for (var i = 0; i < rooms.length; i++) {
|
for (var i = 0; i < rooms.length; i++) {
|
||||||
var alias = rooms[i].canonical_alias || (rooms[i].aliases ? rooms[i].aliases[0] : "Unnamed room");
|
var alias = rooms[i].canonical_alias || (rooms[i].aliases ? rooms[i].aliases[0] : "");
|
||||||
var name = rooms[i].name || alias;
|
var name = rooms[i].name || alias || "Unnamed room";
|
||||||
guestRead = null;
|
guestRead = null;
|
||||||
guestJoin = null;
|
guestJoin = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue