filter artist

This commit is contained in:
2022-04-03 13:26:17 +02:00
parent a01fb852ba
commit 346fd18e0c
2 changed files with 7 additions and 6 deletions

View File

@@ -5,8 +5,9 @@ export function filterSong(song: Song, filterValue: string): boolean {
const textMatch = !!song.text && normalize(song.text).indexOf(normalize(filterValue)) !== -1;
const titleMatch = !!song.title && normalize(song.title).indexOf(normalize(filterValue)) !== -1;
const artistMatch = !!song.title && normalize(song.artist).indexOf(normalize(filterValue)) !== -1;
return textMatch || titleMatch;
return textMatch || titleMatch || artistMatch;
}
function normalize(input: string): string {