Merge pull request #2821 from YaoiFangirl420/develop

Fix bug with NetworkList dropdown
pull/21833/head
Travis Ralston 2019-03-23 22:25:23 -06:00 committed by GitHub
commit 7b972e476f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -131,10 +131,11 @@ export default class NetworkDropdown extends React.Component {
_getMenuOptions() {
const options = [];
const roomDirectory = this.props.config.roomDirectory || {};
let servers = [];
if (this.props.config.roomDirectory.servers) {
servers = servers.concat(this.props.config.roomDirectory.servers);
if (roomDirectory.servers) {
servers = servers.concat(roomDirectory.servers);
}
if (!servers.includes(MatrixClientPeg.getHomeServerName())) {