pg: DLC: ignore timeout if there is no code

https://github.com/vogler/free-games-claimer/issues/208#issuecomment-1868317276
This commit is contained in:
Ralf Vogler 2023-12-23 18:16:30 +01:00
parent e078a1540a
commit ace4ef8303

View file

@ -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';