mirror of https://github.com/vector-im/riot-web
Prevent error when clicking 'log in'
If you joined a room before clicking 'log in', it would throw an exception here and break.pull/21833/head
parent
66ef1e8156
commit
7b28dde263
|
@ -67,7 +67,9 @@ export default class MessageComposer extends React.Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
MatrixClientPeg.get().removeListener("event", this.onEvent);
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener("event", this.onEvent);
|
||||
}
|
||||
}
|
||||
|
||||
onEvent(event) {
|
||||
|
|
Loading…
Reference in New Issue