Skip to content

Commit

Permalink
add empty check to onKeyDown
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Jan 22, 2024
1 parent 94f81a5 commit bd0628b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/plus/ai-help/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function AIHelpUserQuestion({
onKeyDown={(event) => {
if (event.key === "Enter" && !event.shiftKey) {
event.preventDefault();
if (canEdit && question) {
if (canEdit && question?.trim()) {
gleanClick(`${AI_HELP}: edit submit`);
setEditing(false);
submit(
Expand Down

0 comments on commit bd0628b

Please sign in to comment.