mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Fix chat history search
This commit is contained in:
parent
2fb75b3e17
commit
dd9969baf7
@ -20,7 +20,7 @@ export const ChatHistoryView: FC<{}> = props =>
|
||||
|
||||
let text = searchText.toLowerCase();
|
||||
|
||||
return chatHistory.filter(entry => (entry.message.toLowerCase().includes(text)) || entry.name.includes(text));
|
||||
return chatHistory.filter(entry => ((entry.message && entry.message.toLowerCase().includes(text))) || (entry.name && entry.name.toLowerCase().includes(text)));
|
||||
}, [ chatHistory, searchText ]);
|
||||
|
||||
useEffect(() =>
|
||||
|
Loading…
Reference in New Issue
Block a user