mirror of
https://github.com/element-hq/element-web
synced 2024-10-25 20:26:51 +03:00
Merge pull request #3472 from matrix-org/bwindels/fixlogout
Fix: make sure client exists while logging out
This commit is contained in:
commit
7113772f9d
1 changed files with 2 additions and 1 deletions
|
@ -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}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue