make sure client exists while logging out

This commit is contained in:
Bruno Windels 2019-09-24 12:53:33 +02:00
parent 86cbaf5b40
commit 26a8398a0e

View file

@ -1830,7 +1830,8 @@ export default createReactClass({
_setPageSubtitle: function(subtitle='') {
if (this.state.currentRoomId) {
const room = MatrixClientPeg.get().getRoom(this.state.currentRoomId);
const client = MatrixClientPeg.get();
const room = client && client.getRoom(this.state.currentRoomId);
if (room) {
subtitle = `| ${ room.name } ${subtitle}`;
}