diff --git a/src/extension/misc.ts b/src/extension/misc.ts index 93fabbf0..2fb0c67a 100644 --- a/src/extension/misc.ts +++ b/src/extension/misc.ts @@ -247,7 +247,13 @@ if (config.tracker.donationTotalInTitle) { async function formatScheduleImportedPronouns(): Promise { nodecg().log.info('[Misc] Schedule reimported, formatting pronouns'); const runs = sc.getRunDataArray(); + const currentRunId = sc.getCurrentRun()?.id; for (const run of runs) { + // Do not modify the active run. + if (run.id === currentRunId) { + // eslint-disable-next-line no-continue + continue; + } const { teams } = run; teams.forEach((team, x) => { team.players.forEach((player, y) => { diff --git a/src/extension/server.ts b/src/extension/server.ts index 34369312..c2a53ce2 100644 --- a/src/extension/server.ts +++ b/src/extension/server.ts @@ -38,7 +38,13 @@ export async function lookupUsersByStr(str: string): Promise { async function lookupScheduleUserInfo(): Promise { nodecg().log.info('[Server] Schedule reimported, looking up user information'); const runs = sc.getRunDataArray(); + const currentRunId = sc.getCurrentRun()?.id; for (const run of runs) { + // Do not modify the active run. + if (run.id === currentRunId) { + // eslint-disable-next-line no-continue + continue; + } const userIds = run.customData.userIds ? run.customData.userIds.split(',') : []; const userDataArr: any[] = []; for (const id of userIds) {