소스 검색

add null check for search content

heweikang 1 년 전
부모
커밋
b84bb72e07
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/components/search-chat.tsx

+ 1 - 0
app/components/search-chat.tsx

@@ -36,6 +36,7 @@ export function SearchChatPage() {
 
       session.messages.forEach((message) => {
         const content = message.content as string;
+        if (!content.toLowerCase || content === "") return;
         const lowerCaseContent = content.toLowerCase();
 
         // full text search