Replace square-bracket notation with dot notation

pull/29/head
deepsource-autofix[bot] 2020-10-16 07:45:33 +00:00 committed by GitHub
parent df24a681b0
commit e30728bde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -383,7 +383,7 @@ function isCookieExpired(cookie) {
let expiredCookies = false; let expiredCookies = false;
// Ignore cookies that never expire // Ignore cookies that never expire
const expirationUnixTimestamp = cookie["expire"]; const expirationUnixTimestamp = cookie.expire;
if (expirationUnixTimestamp !== "-1") { if (expirationUnixTimestamp !== "-1") {
// Convert UNIX epoch timestamp to normal Date // Convert UNIX epoch timestamp to normal Date
@ -392,7 +392,7 @@ function isCookieExpired(cookie) {
if (expirationDate < Date.now()) { if (expirationDate < Date.now()) {
if (shared.debug) if (shared.debug)
console.log( console.log(
"Cookie " + cookie["name"] + " expired, you need to re-authenticate" "Cookie " + cookie.name + " expired, you need to re-authenticate"
); );
expiredCookies = true; expiredCookies = true;
} }

View File

@ -56,9 +56,9 @@ module.exports.getGameInfo = async function (browser, url) {
info.f95url = url; info.f95url = url;
info.version = info.isMod info.version = info.isMod
? parsedInfos["MOD VERSION"] ? parsedInfos["MOD VERSION"]
: parsedInfos["VERSION"]; : parsedInfos.VERSION;
info.lastUpdate = info.isMod info.lastUpdate = info.isMod
? parsedInfos["UPDATED"] ? parsedInfos.UPDATED
: parsedInfos["THREAD UPDATED"]; : parsedInfos["THREAD UPDATED"];
info.previewSource = await previewSource; info.previewSource = await previewSource;
info.changelog = (await changelog) || "Unknown changelog"; info.changelog = (await changelog) || "Unknown changelog";