pg: redeem gog: fix for undefined reason in response, #5

This commit is contained in:
Ralf Vogler 2023-04-14 11:59:33 +02:00
parent b2d69b4d26
commit 351bf00c7b

View file

@ -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') {