Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavatu committed Oct 21, 2024
1 parent 82a63ea commit e9c24e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/common/FeedbackForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ const FeedbackForm = ({
if (Array.isArray(value)) {
return value.length === 0;
}
return value === '' || value === null || value === undefined;
if (value == null) {
return true;
}
if (typeof value === 'string') {
return value.trim() === '';
}
return false;
}
);

Expand Down

0 comments on commit e9c24e7

Please sign in to comment.