Shun Miyazawa 1 год назад
Родитель
Сommit
67ebd3567b
1 измененных файлов с 1 добавлено и 0 удалено
  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;
     }