Commit ff89fe5a authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Corrects the feedbackform bad syntax

parent 981bbf71
......@@ -61,7 +61,10 @@ export class FeedbackComponent implements OnInit {
this.feedbackForm.get('email').valueChanges.subscribe(
(emailValue) => {
emailValue === '' || emailValue === null ? consent.setValue(false) : null;
if (emailValue === '' || emailValue === null ) {
consent.setValue(false);
}
if (emailValue !== null && emailValue !== '') {
consent.setValidators([Validators.requiredTrue]);
} else {
......@@ -115,7 +118,12 @@ export class FeedbackComponent implements OnInit {
}
get feedbackHasEmail() {
return this.feedbackForm.get('email').value && this.feedbackForm.get('email').value;
if (this.feedbackForm.get('email').value !== null && this.feedbackForm.get('email').value !== '') {
return true;
}
else {
return false;
}
}
get shouldAnimateClosing() {
......
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