1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Fix React crash when using a non-default homeserver on soft logout

The function used exists on the peg, not the client. This commit also fixes the name of the function in a backwards compatible way.
This commit is contained in:
Travis Ralston
2019-07-05 14:35:21 -06:00
parent 017fc84862
commit 1f1a5b2aac
3 changed files with 13 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ export default class SoftLogout extends React.Component {
const hsUrl = MatrixClientPeg.get().getHomeserverUrl();
const domainName = hsUrl === defaultServerConfig.hsUrl
? defaultServerConfig.hsName
: MatrixClientPeg.get().getHomeServerName();
: MatrixClientPeg.getHomeserverName();
const userId = MatrixClientPeg.get().getUserId();
const user = MatrixClientPeg.get().getUser(userId);