mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
fix login-on-guest-bar-NPE crash https://github.com/vector-im/vector-web/issues/930
This commit is contained in:
parent
ca56b7ec2d
commit
4b8b2ade8b
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
MatrixClientPeg.get().removeListener("sync", this.onSyncStateChange);
|
||||
// we may have entirely lost our client as we're logging out before clicking login on the guest bar...
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener("sync", this.onSyncStateChange);
|
||||
}
|
||||
},
|
||||
|
||||
onSyncStateChange: function(state, prevState) {
|
||||
|
|
Loading…
Reference in a new issue