diff --git a/commands/100-games/wrapped.js b/commands/100-games/wrapped.js index 4e55ec4..65b5df3 100644 --- a/commands/100-games/wrapped.js +++ b/commands/100-games/wrapped.js @@ -259,9 +259,11 @@ async function GetFavouriteGenres() { const genres = []; const counts = []; for (let i = 0; i < beatGameIGDBEntries.length; i++) { - for (let j = 0; j < beatGameIGDBEntries[i].genres.length; j++) { - const genre = await getGenres(beatGameIGDBEntries[i].genres[j]); - genres.push(genre); + if (beatGameIGDBEntries[i].genres) { + for (let j = 0; j < beatGameIGDBEntries[i].genres.length; j++) { + const genre = await getGenres(beatGameIGDBEntries[i].genres[j]); + genres.push(genre); + } } }