]> Untitled Git - lemmy.git/commitdiff
Fixing empty email field in register form breaking signups.
authorDessalines <tyhou13@gmx.com>
Sun, 29 Dec 2019 01:25:36 +0000 (20:25 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 29 Dec 2019 01:25:36 +0000 (20:25 -0500)
- Fixes #382

ui/src/components/login.tsx

index 9a3cf3e33a2e023f706b22b37680abe0e93be7c9..c8de6c70edc9a741b9dbf07858427efc678ec56d 100644 (file)
@@ -271,6 +271,9 @@ export class Login extends Component<any, State> {
 
   handleRegisterEmailChange(i: Login, event: any) {
     i.state.registerForm.email = event.target.value;
+    if (i.state.registerForm.email == '') {
+      i.state.registerForm.email = undefined;
+    }
     i.setState(i.state);
   }