Skip to content

Commit

Permalink
Use stringToLower instead of RegExp to find endpoint matches
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Jun 17, 2021
1 parent 08da210 commit 5c34f3b
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -168,7 +168,9 @@ const fetchLinkSuggestions = async (
const customItems = results.filter(
( result ) =>
search === '' ||
result.title.match( new RegExp( search, 'i' ) )
result.title
.toLowerCase()
.includes( search.toLowerCase() )
);
return customItems.map( ( item ) => ( {
id: item.id,
Expand Down

0 comments on commit 5c34f3b

Please sign in to comment.