From 351bf00c7b78a94b72d2a5fb1d9085b385ec41bb Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Fri, 14 Apr 2023 11:59:33 +0200 Subject: [PATCH] pg: redeem gog: fix for undefined reason in response, #5 --- prime-gaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-gaming.js b/prime-gaming.js index e975c75..b7fa620 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -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') {