Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2821 from YaoiFangirl420/develop
Browse files Browse the repository at this point in the history
Fix bug with NetworkList dropdown
  • Loading branch information
turt2live authored Mar 24, 2019
2 parents 68997f9 + 00335e2 commit 7b972e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/views/directory/NetworkDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down

0 comments on commit 7b972e4

Please sign in to comment.