bugfixing

This commit is contained in:
2020-06-14 15:46:24 +02:00
parent 1e1e127f13
commit 19b28453d3
36 changed files with 175 additions and 97 deletions

View File

@@ -38,8 +38,8 @@ export class SongListComponent implements OnInit, OnDestroy {
this.songs$ = combineLatest([filter$, songs$]).pipe(
map(_ => {
let songs = _[1];
let filter = _[0];
const songs = _[1];
const filter = _[0];
this.anyFilterActive = this.checkIfFilterActive(filter);
return songs.filter(song => this.filter(song, filter));
})
@@ -68,10 +68,14 @@ export class SongListComponent implements OnInit, OnDestroy {
}
private checkFlag(flag: string, flags: string) {
if (!flags) return false;
if (!flags) {
return false;
}
const flagStrings = flags.split(';');
if (flagStrings.length === 0) return false;
if (flagStrings.length === 0) {
return false;
}
return flagStrings.indexOf(flag) !== -1;
}