You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Avoid room directory error without a client
This commit is contained in:
@ -78,6 +78,11 @@ module.exports = React.createClass({
|
|||||||
this.protocols = null;
|
this.protocols = null;
|
||||||
|
|
||||||
this.setState({protocolsLoading: true});
|
this.setState({protocolsLoading: true});
|
||||||
|
if (!MatrixClientPeg.get()) {
|
||||||
|
// We may not have a client yet when invoked from welcome page
|
||||||
|
this.setState({protocolsLoading: false});
|
||||||
|
return;
|
||||||
|
}
|
||||||
MatrixClientPeg.get().getThirdpartyProtocols().done((response) => {
|
MatrixClientPeg.get().getThirdpartyProtocols().done((response) => {
|
||||||
this.protocols = response;
|
this.protocols = response;
|
||||||
this.setState({protocolsLoading: false});
|
this.setState({protocolsLoading: false});
|
||||||
|
Reference in New Issue
Block a user