From adc23faf4bc39c03c99202244863b9dd530ac717 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 17 Apr 2019 09:35:45 +0100 Subject: [PATCH] Test `defaultServerName` before showing it on forgot password The Forgot Password screen wasn't checking the default server name for a value before showing it, leading to a possible "Your Matrix account on " message. Fixes https://github.com/vector-im/riot-web/issues/9507 --- src/components/structures/auth/ForgotPassword.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index 8c7bf50bcf..46071f0a9c 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -222,7 +222,7 @@ module.exports = React.createClass({ } let yourMatrixAccountText = _t('Your Matrix account'); - if (this.state.enteredHsUrl === this.props.defaultHsUrl) { + if (this.state.enteredHsUrl === this.props.defaultHsUrl && this.props.defaultServerName) { yourMatrixAccountText = _t('Your Matrix account on %(serverName)s', { serverName: this.props.defaultServerName, });