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:
parent
ff35e02b4d
commit
942659df0d
1 changed files with 2 additions and 1 deletions
|
@ -56,7 +56,8 @@ module.exports = React.createClass({
|
||||||
name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender();
|
name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender();
|
||||||
}
|
}
|
||||||
else {
|
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
|
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
|
||||||
|
|
Loading…
Reference in a new issue