mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
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 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);
|
||||
|
Loading…
Reference in New Issue
Block a user