Merge pull request #3188 from matrix-org/travis/soft-logout-non-default-hs

Fix React crash when using a non-default homeserver on soft logout
This commit is contained in:
Travis Ralston 2019-07-09 11:32:31 -06:00 committed by GitHub
commit a33e5f1918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View file

@ -145,7 +145,7 @@ module.exports = React.createClass({
// too. If it's changed, appending to the list will corrupt it.
const my_next_batch = this.nextBatch;
const opts = {limit: 20};
if (my_server != MatrixClientPeg.getHomeServerName()) {
if (my_server != MatrixClientPeg.getHomeserverName()) {
opts.server = my_server;
}
if (this.state.instanceId) {

View file

@ -52,7 +52,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);