mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Filter out undefined messages for past chats search
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user