Browse Source

Add comment

Shun Miyazawa 1 year ago
parent
commit
67ebd3567b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      apps/app/src/features/openai/client/services/editor-assistant.ts

+ 1 - 0
apps/app/src/features/openai/client/services/editor-assistant.ts

@@ -121,6 +121,7 @@ export const useEditorAssistant: UseEditorAssistant = () => {
       userMessage,
     };
 
+    // Insert selectedText into object after null check since JSON.stringify returns empty string when selectedText is undefined
     if (selectedText != null) {
       body.markdown = selectedText;
     }