From ace4ef8303b0cf312323a62c9138ad335788b75d Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Sat, 23 Dec 2023 18:16:30 +0100 Subject: [PATCH] pg: DLC: ignore timeout if there is no code https://github.com/vogler/free-games-claimer/issues/208#issuecomment-1868317276 --- prime-gaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-gaming.js b/prime-gaming.js index 25574b2..067ef37 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -367,7 +367,7 @@ try { dlc_unlinked[unlinked_store] ??= []; dlc_unlinked[unlinked_store].push(title); } else { - const code = await page.inputValue('input[type="text"]'); + const code = await page.inputValue('input[type="text"]').catch(_ => undefined); console.log(' Code to redeem game:', chalk.blue(code)); db.data[user][title].code = code; db.data[user][title].status = 'claimed';