Fix bug where no genres caused error

This commit is contained in:
simojenki
2021-08-29 08:14:23 +10:00
parent 543d352204
commit e2e73209a2
2 changed files with 24 additions and 1 deletions

View File

@@ -537,7 +537,7 @@ export class Navidrome implements MusicService {
.getJSON<GenGenresResponse>(credentials, "/rest/getGenres")
.then((it) =>
pipe(
it.genres.genre,
it.genres.genre || [],
A.map((it) => it.__text),
A.sort(ordString),
A.map((it) => ({ id: it, name: it }))