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:
commit
a33e5f1918
4 changed files with 7 additions and 7 deletions
|
@ -199,7 +199,7 @@ class MatrixClientPeg {
|
|||
* Throws an error if unable to deduce the homeserver name
|
||||
* (eg. if the user is not logged in)
|
||||
*/
|
||||
getHomeServerName() {
|
||||
getHomeserverName() {
|
||||
const matches = /^@.+:(.+)$/.exec(this.matrixClient.credentials.userId);
|
||||
if (matches === null || matches.length < 1) {
|
||||
throw new Error("Failed to derive homeserver name from user ID!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue