Merge pull request #504 from matrix-org/dbkr/fix_login_if_joined
Prevent error when clicking 'log in'
This commit is contained in:
commit
302074c71f
1 changed files with 3 additions and 1 deletions
|
@ -67,8 +67,10 @@ export default class MessageComposer extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
if (MatrixClientPeg.get()) {
|
||||||
MatrixClientPeg.get().removeListener("event", this.onEvent);
|
MatrixClientPeg.get().removeListener("event", this.onEvent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onEvent(event) {
|
onEvent(event) {
|
||||||
if (event.getType() !== 'm.room.encryption') return;
|
if (event.getType() !== 'm.room.encryption') return;
|
||||||
|
|
Loading…
Reference in a new issue