Fix HS/IS URL reset when switching to Registration

This commit is contained in:
lukebarnard 2018-02-07 15:51:03 +00:00
parent cf4ae681f4
commit 45ad46b468
3 changed files with 37 additions and 11 deletions

View file

@ -61,6 +61,7 @@ module.exports = React.createClass({
// registration shouldn't know or care how login is done.
onLoginClick: PropTypes.func.isRequired,
onCancelClick: PropTypes.func,
onServerConfigChange: PropTypes.func.isRequired,
},
getInitialState: function() {
@ -131,6 +132,7 @@ module.exports = React.createClass({
if (config.isUrl !== undefined) {
newState.isUrl = config.isUrl;
}
this.props.onServerConfigChange(config);
this.setState(newState, function() {
this._replaceClient();
});