1
0
Fork 0
mirror of synced 2024-07-05 22:40:39 +12:00

switch from regex to includes

This commit is contained in:
Martin McKeaveney 2021-09-30 15:08:29 +01:00
parent a0f4043e13
commit 9f6961a90c

View file

@ -40,7 +40,7 @@
$: enrichedApps = enrichApps($apps, $auth.user, sortBy) $: enrichedApps = enrichApps($apps, $auth.user, sortBy)
$: filteredApps = enrichedApps.filter(app => $: filteredApps = enrichedApps.filter(app =>
new RegExp(searchTerm, "ig").test(app?.name) app?.name?.toLowerCase().includes(searchTerm.toLowerCase())
) )
const enrichApps = (apps, user, sortBy) => { const enrichApps = (apps, user, sortBy) => {