Browse Source

add null check for search content

heweikang 1 năm trước cách đây
mục cha
commit
b84bb72e07
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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