quer/the-steam-awards

(node:4444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sort' of undefined

aVitaliy opened this issue · 2 comments

I'm having a problem with steamAwardNominateGame_v2.js

image

quer commented

the happen on json.response.games.sort(function(a, b){return b.playtime_forever - a.playtime_forever});

that can only fail, if the accound do not have any games. Or if the account is not public. so the global apikey, do not have access to the games that on that account.

if you have the api key, foreach account you can add it to the config, and add so it use the fetch for each account, and not the top apikey. read more here
#17 (comment)

I set all flags to public and then everything worked perfectly.