Skip to content

Commit

Permalink
[Fix #69] User cannot make an empty comment by pressing "Ctrl + Enter…
Browse files Browse the repository at this point in the history
…" anymore
  • Loading branch information
LaChope committed Nov 3, 2021
1 parent e15c5e2 commit 67e3fc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/comment/CommentForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CommentForm = (props) => {
}

const onKeyUpHandler = (e) => {
if (e.key === 'Enter'&& e.ctrlKey) submitHandler(e)
if (e.key === 'Enter'&& e.ctrlKey && commentValue.trim()) submitHandler(e);
}

const onClickHandler = (e) => {
Expand Down

0 comments on commit 67e3fc0

Please sign in to comment.