Test domains in config directly
This commit is contained in:
parent
d96043d5ab
commit
234f1bf2c4
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||||
const hostSignupDomains = hostSignupConfig.domains || [];
|
const hostSignupDomains = hostSignupConfig.domains || [];
|
||||||
const mxDomain = MatrixClientPeg.get().getDomain();
|
const mxDomain = MatrixClientPeg.get().getDomain();
|
||||||
const validDomains = hostSignupDomains.filter(d => (d === mxDomain || mxDomain.endsWith(`.${d}`)));
|
const validDomains = hostSignupDomains.filter(d => (d === mxDomain || mxDomain.endsWith(`.${d}`)));
|
||||||
if (!hostSignupDomains || validDomains.length > 0) {
|
if (!hostSignupConfig.domains || validDomains.length > 0) {
|
||||||
topSection = <div onClick={this.onCloseMenu}>
|
topSection = <div onClick={this.onCloseMenu}>
|
||||||
<HostSignupAction />
|
<HostSignupAction />
|
||||||
</div>;
|
</div>;
|
||||||
|
|
Loading…
Reference in a new issue