From 672fbb287316641bdcccf0b6314a40bd165f23a9 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 28 Oct 2017 18:33:38 +0100 Subject: [PATCH] hopefully fix NPE on toLowerCase --- src/components/structures/login/Registration.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index 17204ee4e8..2403610416 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -303,7 +303,9 @@ module.exports = React.createClass({ } : {}; return this._matrixClient.register( - this.state.formVals.username.toLowerCase(), + (this.state.formVals.username ? + this.state.formVals.username.toLowerCase() : + this.state.formVals.username), this.state.formVals.password, undefined, // session id: included in the auth dict already auth,