remove not needed await

This commit is contained in:
Ralf Vogler 2023-02-14 10:43:24 +01:00
parent c058bafcf3
commit c65f153090

View file

@ -92,7 +92,7 @@ try {
db.data[user] ||= {}; db.data[user] ||= {};
// Detect free games // Detect free games
const game_loc = await page.locator('a:has(span:text-is("Free Now"))'); const game_loc = page.locator('a:has(span:text-is("Free Now"))');
await game_loc.last().waitFor(); await game_loc.last().waitFor();
// clicking on `game_sel` sometimes led to a 404, see https://github.com/vogler/free-games-claimer/issues/25 // clicking on `game_sel` sometimes led to a 404, see https://github.com/vogler/free-games-claimer/issues/25
// debug showed that in those cases the href was still correct, so we `goto` the urls instead of clicking. // debug showed that in those cases the href was still correct, so we `goto` the urls instead of clicking.
@ -188,5 +188,5 @@ try {
notify(`epic-games:<br>${html_game_list(notify_games)}`); notify(`epic-games:<br>${html_game_list(notify_games)}`);
} }
} }
await writeFileSync(path.resolve(dirs.browser, 'cookies.json'), JSON.stringify(await context.cookies())); writeFileSync(path.resolve(dirs.browser, 'cookies.json'), JSON.stringify(await context.cookies()));
await context.close(); await context.close();