You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Fix exception on logout
Don't try to unregister if we never registered
This commit is contained in:
@@ -46,6 +46,8 @@ export default class EmbeddedPage extends React.PureComponent {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
this._dispatcherRef = null;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
page: '',
|
page: '',
|
||||||
};
|
};
|
||||||
@@ -90,7 +92,7 @@ export default class EmbeddedPage extends React.PureComponent {
|
|||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this._unmounted = true;
|
this._unmounted = true;
|
||||||
dis.unregister(this._dispatcherRef);
|
if (this._dispatcherRef !== null) dis.unregister(this._dispatcherRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
onAction = (payload) => {
|
onAction = (payload) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user