You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user