Commit 9a748e47 authored by Janik Münzenberger's avatar Janik Münzenberger
Browse files

Bugfix not logged in user

parent cd973b5c
......@@ -30,7 +30,7 @@ export class EmailComponent implements OnInit {
this.emailForm = new FormGroup(
{
'email_receiver': new FormControl(null, [Validators.email, Validators.required]),
'email_sender': new FormControl(user.email, [Validators.required, Validators.email, Validators.minLength(8)]),
'email_sender': new FormControl(user ? user.email : null, [Validators.required, Validators.email, Validators.minLength(8)]),
'email_message': new FormControl(null, [Validators.required])
}
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment