Преглед на файлове

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