Skip to content

Commit

Permalink
Add null check for issue title validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ay-bh committed Nov 2, 2024
1 parent d200763 commit 1bff72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/issue_tracker/jsx/IssueCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const IssueCard = React.memo(function IssueCard({
const handleSubmit = (e) => {
e.preventDefault();

if (!tempEditedIssue.title.trim()) {
if (!tempEditedIssue.title || !tempEditedIssue.title.trim()) {
showAlertMessage('error', 'Title cannot be empty');
return;
}
Expand Down

0 comments on commit 1bff72c

Please sign in to comment.