mirror of
https://github.com/revanced/revanced-website.git
synced 2025-06-12 21:27:42 +02:00
fix: improve search results
This commit is contained in:
@ -15,9 +15,13 @@
|
||||
|
||||
let current: boolean = false;
|
||||
let searchTerm: string;
|
||||
$: searchTermLowerCase = searchTerm?.toLowerCase();
|
||||
|
||||
function search(patch: Patch) {
|
||||
if (patch.name.includes(searchTerm) || patch.description.includes(searchTerm)) {
|
||||
if (
|
||||
patch.description.toLowerCase().includes(searchTermLowerCase) ||
|
||||
patch.name.replace(/-/g, ' ').toLowerCase().includes(searchTermLowerCase)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user