mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Prevent error when clicking 'log in'
If you joined a room before clicking 'log in', it would throw an exception here and break.
This commit is contained in:
parent
66ef1e8156
commit
7b28dde263
1 changed files with 3 additions and 1 deletions
|
@ -67,8 +67,10 @@ export default class MessageComposer extends React.Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener("event", this.onEvent);
|
||||
}
|
||||
}
|
||||
|
||||
onEvent(event) {
|
||||
if (event.getType() !== 'm.room.encryption') return;
|
||||
|
|
Loading…
Reference in a new issue