Skip to content
Snippets Groups Projects
Commit ff89fe5a authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Corrects the feedbackform bad syntax

parent 981bbf71
No related branches found
No related tags found
1 merge request!118Corrects some remaining sonarqube bug reports
...@@ -61,7 +61,10 @@ export class FeedbackComponent implements OnInit { ...@@ -61,7 +61,10 @@ export class FeedbackComponent implements OnInit {
this.feedbackForm.get('email').valueChanges.subscribe( this.feedbackForm.get('email').valueChanges.subscribe(
(emailValue) => { (emailValue) => {
emailValue === '' || emailValue === null ? consent.setValue(false) : null; if (emailValue === '' || emailValue === null ) {
consent.setValue(false);
}
if (emailValue !== null && emailValue !== '') { if (emailValue !== null && emailValue !== '') {
consent.setValidators([Validators.requiredTrue]); consent.setValidators([Validators.requiredTrue]);
} else { } else {
...@@ -115,7 +118,12 @@ export class FeedbackComponent implements OnInit { ...@@ -115,7 +118,12 @@ export class FeedbackComponent implements OnInit {
} }
get feedbackHasEmail() { 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() { get shouldAnimateClosing() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment