Skip to content

Commit

Permalink
pg: redeem gog: fix for undefined reason in response, #5
Browse files Browse the repository at this point in the history
  • Loading branch information
vogler committed Apr 14, 2023
1 parent b2d69b4 commit 351bf00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prime-gaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ try {
// {"reason":"code_used"}
// {"reason":"code_not_found"}
const reason = JSON.parse(rt).reason;
if (reason.includes('captcha')) {
if (reason && reason.includes('captcha')) {
redeem_action = 'redeem (got captcha)';
console.error(' Got captcha; could not redeem!');
} else if (reason == 'code_used') {
Expand Down

0 comments on commit 351bf00

Please sign in to comment.