Fix bug with NetworkList dropdown
The NetworkDropdown component was incorrectly guarding against a null check when retrieving the list of networks Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
This commit is contained in:
parent
68997f9652
commit
00335e2462
1 changed files with 3 additions and 2 deletions
|
@ -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())) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue