Merge pull request #2821 from YaoiFangirl420/develop

Fix bug with NetworkList dropdown
This commit is contained in:
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

View file

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