소스 검색

clean code

Shun Miyazawa 1 년 전
부모
커밋
0a984eaf32
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      apps/app/src/features/openai/client/components/AiAssistant/AiAssistantChatSidebar/AiAssistantChatSidebar.tsx

+ 1 - 2
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantChatSidebar/AiAssistantChatSidebar.tsx

@@ -41,7 +41,6 @@ type FormData = {
   summaryMode?: boolean;
 };
 
-
 type AiAssistantChatSidebarSubstanceProps = {
   aiAssistantData?: AiAssistantHasId;
   messageData?: OpenAI.Beta.Threads.Messages.MessagesPage;
@@ -117,7 +116,7 @@ const AiAssistantChatSidebarSubstance: React.FC<AiAssistantChatSidebarSubstanceP
     // create thread
     let currentThreadId = threadId;
     const aiAssistantId = aiAssistantData?._id;
-    if (threadId == null && aiAssistantId) {
+    if (threadId == null && aiAssistantId != null) {
       try {
         const res = await apiv3Post('/openai/thread', { aiAssistantId });
         const thread = res.data.thread;