From c65f1530905dd6c54d60b2f0482d5ffe9f4646d0 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Tue, 14 Feb 2023 10:43:24 +0100 Subject: [PATCH] remove not needed await --- epic-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epic-games.js b/epic-games.js index e29ee42..735b101 100644 --- a/epic-games.js +++ b/epic-games.js @@ -92,7 +92,7 @@ try { db.data[user] ||= {}; // 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(); // 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. @@ -188,5 +188,5 @@ try { notify(`epic-games:
${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();