From 9def0bb5c2947ecfc53ce1abbe8e959cc2ab23d8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 8 Jun 2017 16:08:19 +0100 Subject: [PATCH] Oops, fix email check --- src/components/structures/login/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/login/Login.js b/src/components/structures/login/Login.js index 6d0e929c93..bbfff3712e 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/login/Login.js @@ -90,7 +90,7 @@ module.exports = React.createClass({ let errorText; // Some error strings only apply for logging in - const usingEmail = username.indexOf("@"); + const usingEmail = username.indexOf("@") > 0; if (error.httpStatus == 400 && usingEmail) { errorText = _t('This Home Server does not support login using email address.'); } else if (error.httpStatus == 401 || error.httpStatus === 403) {