Filter out undefined messages for past chats search
This commit is contained in:
parent
2f8f6844fe
commit
6c29879f12
|
@ -5319,7 +5319,7 @@ export async function displayPastChats() {
|
||||||
const fileName = chat['file_name'];
|
const fileName = chat['file_name'];
|
||||||
const chatContent = rawChats[fileName];
|
const chatContent = rawChats[fileName];
|
||||||
|
|
||||||
return chatContent && Object.values(chatContent).some(message => message.mes.toLowerCase().includes(searchQuery.toLowerCase()));
|
return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(filteredData);
|
console.log(filteredData);
|
||||||
|
|
Loading…
Reference in New Issue