From e30728bde544d4b7229e6e3a6bac2c523b4f3cc5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2020 07:45:33 +0000 Subject: [PATCH] Replace square-bracket notation with dot notation --- app/index.js | 4 ++-- app/scripts/game-scraper.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/index.js b/app/index.js index a44dcbe..82be7c1 100644 --- a/app/index.js +++ b/app/index.js @@ -383,7 +383,7 @@ function isCookieExpired(cookie) { let expiredCookies = false; // Ignore cookies that never expire - const expirationUnixTimestamp = cookie["expire"]; + const expirationUnixTimestamp = cookie.expire; if (expirationUnixTimestamp !== "-1") { // Convert UNIX epoch timestamp to normal Date @@ -392,7 +392,7 @@ function isCookieExpired(cookie) { if (expirationDate < Date.now()) { if (shared.debug) console.log( - "Cookie " + cookie["name"] + " expired, you need to re-authenticate" + "Cookie " + cookie.name + " expired, you need to re-authenticate" ); expiredCookies = true; } diff --git a/app/scripts/game-scraper.js b/app/scripts/game-scraper.js index cc66855..b86a75e 100644 --- a/app/scripts/game-scraper.js +++ b/app/scripts/game-scraper.js @@ -56,9 +56,9 @@ module.exports.getGameInfo = async function (browser, url) { info.f95url = url; info.version = info.isMod ? parsedInfos["MOD VERSION"] - : parsedInfos["VERSION"]; + : parsedInfos.VERSION; info.lastUpdate = info.isMod - ? parsedInfos["UPDATED"] + ? parsedInfos.UPDATED : parsedInfos["THREAD UPDATED"]; info.previewSource = await previewSource; info.changelog = (await changelog) || "Unknown changelog";