diff --git a/skins/base/views/templates/Login.js b/skins/base/views/templates/Login.js index 887c7ca79a..bef13b1d74 100644 --- a/skins/base/views/templates/Login.js +++ b/skins/base/views/templates/Login.js @@ -80,8 +80,19 @@ module.exports = React.createClass({ }, onHsUrlChanged: function() { - this.customHsUrl = this.refs.serverConfig.getHsUrl().trim(); - this.customIsUrl = this.refs.serverConfig.getIsUrl().trim(); + var newHsUrl = this.refs.serverConfig.getHsUrl().trim(); + var newIsUrl = this.refs.serverConfig.getIsUrl().trim(); + + if (newHsUrl == this.customHsUrl && + newIsUrl == this.customIsUrl) + { + return; + } + else { + this.customHsUrl = newHsUrl; + this.customIsUrl = newIsUrl; + } + MatrixClientPeg.replaceUsingUrls( this.getHsUrl(), this.getIsUrl()