Merge pull request #3472 from matrix-org/bwindels/fixlogout

Fix: make sure client exists while logging out
pull/21833/head
Bruno Windels 2019-09-24 11:00:47 +00:00 committed by GitHub
commit 7113772f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1830,7 +1830,8 @@ export default createReactClass({
_setPageSubtitle: function(subtitle='') { _setPageSubtitle: function(subtitle='') {
if (this.state.currentRoomId) { 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) { if (room) {
subtitle = `| ${ room.name } ${subtitle}`; subtitle = `| ${ room.name } ${subtitle}`;
} }