From 3ae69dcac9a1682b51408149fca0f398a021f2e8 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Sun, 7 Sep 2025 16:54:06 -0500 Subject: [PATCH] Only log session / system if beta or local; fix promise --- src/system/game-data.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 6eec78b1b2d..8c6f63450f7 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -68,6 +68,7 @@ import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } fro import { decrypt, encrypt } from "#utils/data"; import { getEnumKeys } from "#utils/enums"; import { getPokemonSpecies } from "#utils/pokemon-utils"; +import { isBeta } from "#utils/utility-vars"; import { AES, enc } from "crypto-js"; import i18next from "i18next"; @@ -422,7 +423,9 @@ export class GameData { } } - console.debug(systemData); + if (isLocal || isBeta) { + console.debug(JSON.parse(JSON.stringify(systemData))); + } localStorage.setItem(`data_${loggedInUser?.username}`, encrypt(systemDataStr, bypassLogin)); @@ -1038,7 +1041,9 @@ export class GameData { const { promise, resolve, reject } = Promise.withResolvers(); try { const initSessionFromData = (fromSession: SessionSaveData) => { - console.debug(fromSession); + if (isLocal || isBeta) { + console.debug(JSON.parse(JSON.stringify(fromSession))); + } // overwrite slot ID if somehow not set. fromSession.slotId = slotId; @@ -1185,9 +1190,6 @@ export class GameData { } else { this.getSession(slotId) .then(data => { - if (data) { - initSessionFromData(data); - } return data && initSessionFromData(data); }) .catch(err => {