fix: valid mbid + no genre

This commit is contained in:
Cory Dransfeldt 2023-08-28 11:48:29 -07:00
parent 0abc374531
commit 6630d84750
No known key found for this signature in database

View file

@ -51,7 +51,7 @@ export default async () => {
type: 'json',
}).catch()
const genreData = await genreRes.json()
genre = genreData.genres.sort((a, b) => b.count - a.count)[0]['name']
genre = genreData.genres.sort((a, b) => b.count - a.count)[0]?.['name'] || ''
}
return Response.json({