ソースを参照

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