Fix non-fuzzy char search

- Utilize new utility function that checks insensitive and without accents
This commit is contained in:
Wolfsblvt
2024-04-30 06:03:41 +02:00
parent bc94e3992f
commit 83f79c1466
2 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { fuzzySearchCharacters, fuzzySearchGroups, fuzzySearchPersonas, fuzzySearchTags, fuzzySearchWorldInfo, power_user } from './power-user.js';
import { tag_map } from './tags.js';
import { includesIgnoreCaseAndAccents } from './utils.js';
/**
@ -306,7 +307,7 @@ export class FilterHelper {
}
else {
// Compare insensitive and without accents
return entity.item?.name?.localeCompare(searchValue, undefined, { sensitivity: 'base' }) === 0;
return includesIgnoreCaseAndAccents(entity.item?.name, searchValue);
}
}