Skip to content

Commit 5ca391f

Browse files
committed
Replace double truth test with something sane
Also typo
1 parent a32abae commit 5ca391f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/components/structures/RoomDirectory.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ module.exports = React.createClass({
376376
// rooms created by a user joining a bridge 'portal' alias to
377377
// participate in that room or a foreign network. A room is a
378378
// portal room if it has exactly one alias and that alias matches
379-
// a pattern defined in the config. It's network is the key
379+
// a pattern defined in the config. Its network is the key
380380
// of the pattern that it matches.
381381
// All other rooms are considered 'native matrix' rooms, and
382382
// go into the special '_matrix' network.
@@ -386,10 +386,8 @@ module.exports = React.createClass({
386386
if (this.props.config.serverConfig && this.props.config.serverConfig[server] && this.props.config.serverConfig[server].networks) {
387387
for (const n of this.props.config.serverConfig[server].networks) {
388388
const pat = this.networkPatterns[n];
389-
if (pat && pat) {
390-
if (this.networkPatterns[n].test(room.aliases[0])) {
391-
roomNetwork = n;
392-
}
389+
if (pat && pat.test(room.aliases[0])) {
390+
roomNetwork = n;
393391
}
394392
}
395393
}

0 commit comments

Comments
 (0)