Skip to content

Commit

Permalink
fix(CommentForm): comment form doesnt close correctly on click outside
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVorop committed Jul 19, 2023
1 parent b636afa commit 0827d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/CommentForm/CommentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const CommentForm: React.FC<CommentFormProps> = ({
);

useClickOutside(ref, () => {
if (!Object.values(control._fields).some((v) => v?._f.value !== '')) {
if (!Object.values(control._fields).some((v) => v?._f.value)) {
onCommentCancel();
}
});
Expand Down

0 comments on commit 0827d8b

Please sign in to comment.