Work around the bug where some channels have no name from the js sdk which was causing vector to exception and never load.

This commit is contained in:
David Baker 2015-11-04 14:15:57 +00:00
parent ff35e02b4d
commit 942659df0d
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ module.exports = React.createClass({
name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender();
}
else {
name = this.props.room.name;
// XXX: We should never display raw room IDs, but sometimes the room name js sdk gives is undefined
name = this.props.room.name || this.props.room.roomId;
}
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon