fix: Refreshing search page with special character in query does not reflect

fix: Search query that looks like regex causes JS error
This commit is contained in:
Tom Moor
2019-10-27 22:34:11 -07:00
parent 77153a2529
commit f7a9152ee3
2 changed files with 2 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ class DocumentPreview extends React.Component<Props> {
const queryIsInTitle =
!!highlight &&
!!document.title.toLowerCase().match(highlight.toLowerCase());
!!document.title.toLowerCase().includes(highlight.toLowerCase());
return (
<DocumentLink