Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/extension/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,13 @@ if (config.tracker.donationTotalInTitle) {
async function formatScheduleImportedPronouns(): Promise<void> {
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) => {
Expand Down
6 changes: 6 additions & 0 deletions src/extension/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ export async function lookupUsersByStr(str: string): Promise<any[]> {
async function lookupScheduleUserInfo(): Promise<void> {
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) {
Expand Down