diff --git a/src/components/NewCommentForm.tsx b/src/components/NewCommentForm.tsx index 7d3e97aaa..70375f586 100644 --- a/src/components/NewCommentForm.tsx +++ b/src/components/NewCommentForm.tsx @@ -75,7 +75,7 @@ export const NewCommentForm: React.FC = ({ setComentError('Enter some text'); } - if (nameValue && emailValue && comentValue && post) { + if (nameValue.trim() && emailValue.trim() && comentValue.trim() && post) { addComent(post.id, nameValue, emailValue, comentValue); setComentValue(''); }