diff --git a/commands/100-games/wrapped.js b/commands/100-games/wrapped.js index 5d7f288..4e55ec4 100644 --- a/commands/100-games/wrapped.js +++ b/commands/100-games/wrapped.js @@ -116,8 +116,11 @@ async function GetDevelopers() { const companyIds = new Set(); for (let i = 0; i < beatGameIGDBEntries.length; i++) { - for (let j = 0; j < beatGameIGDBEntries[i].involved_companies.length; j++) { - companyIds.add(beatGameIGDBEntries[i].involved_companies[j]); + if (beatGameIGDBEntries[i].involved_companies) + { + for (let j = 0; j < beatGameIGDBEntries[i].involved_companies.length; j++) { + companyIds.add(beatGameIGDBEntries[i].involved_companies[j]); + } } } diff --git a/igdbHelperFunctions.js b/igdbHelperFunctions.js index b8f2115..e661a2e 100644 --- a/igdbHelperFunctions.js +++ b/igdbHelperFunctions.js @@ -133,7 +133,7 @@ async function getCompanyInfo(id) { developer = response[0]; }) .catch(err => { - console.error(err); + return console.error(err); }); return developer;