diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 451b95da976a..fe20b63a1455 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1759,7 +1759,8 @@ export default class MatrixChat extends React.PureComponent { } else if (screen === "start_sso" || screen === "start_cas") { let cli = MatrixClientPeg.get(); if (!cli) { - const { hsUrl, isUrl } = this.props.serverConfig; + const hsUrl = this.props.serverConfig?.hsUrl || ""; + const isUrl = this.props.serverConfig?.isUrl; cli = createClient({ baseUrl: hsUrl, idBaseUrl: isUrl,