diff --git a/frontend/src/ts/controllers/chart-controller.ts b/frontend/src/ts/controllers/chart-controller.ts index 48759b8b6..a0c613227 100644 --- a/frontend/src/ts/controllers/chart-controller.ts +++ b/frontend/src/ts/controllers/chart-controller.ts @@ -85,24 +85,24 @@ class ChartWithUpdateColors< } async updateColors(): Promise { - //@ts-expect-error its too difficult to figure out these types, but this works + //@ts-expect-error it's too difficult to figure out these types, but this works await updateColors(this); } getDataset(id: DatasetIds): ChartDataset { - //@ts-expect-error its too difficult to figure out these types, but this works + //@ts-expect-error it's too difficult to figure out these types, but this works return this.data.datasets?.find((x) => x.yAxisID === id); } getScaleIds(): DatasetIds[] { - //@ts-expect-error its too difficult to figure out these types, but this works + //@ts-expect-error it's too difficult to figure out these types, but this works return typedKeys(this.options?.scales ?? {}) as DatasetIds[]; } getScale( id: DatasetIds extends never ? never : "x" | DatasetIds, ): DatasetIds extends never ? never : CartesianScaleOptions { - //@ts-expect-error its too difficult to figure out these types, but this works + //@ts-expect-error it's too difficult to figure out these types, but this works // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access return this.options.scales[id]; } @@ -120,7 +120,7 @@ export const result = new ChartWithUpdateColors< labels: [], datasets: [ { - //@ts-expect-error the type is defined incorrectly, have to ingore the error + //@ts-expect-error the type is defined incorrectly, have to ignore the error clip: false, label: "wpm", data: [], @@ -131,7 +131,7 @@ export const result = new ChartWithUpdateColors< pointRadius: 1, }, { - //@ts-expect-error the type is defined incorrectly, have to ingore the error + //@ts-expect-error the type is defined incorrectly, have to ignore the error clip: false, label: "raw", data: [], @@ -143,7 +143,7 @@ export const result = new ChartWithUpdateColors< pointRadius: 0, }, { - //@ts-expect-error the type is defined incorrectly, have to ingore the error + //@ts-expect-error the type is defined incorrectly, have to ignore the error clip: false, label: "errors", data: [], @@ -166,7 +166,7 @@ export const result = new ChartWithUpdateColors< }, }, { - //@ts-expect-error the type is defined incorrectly, have to ingore the error + //@ts-expect-error the type is defined incorrectly, have to ignore the error clip: false, label: "burst", data: [], @@ -1268,7 +1268,7 @@ async function updateColors< return; } - //@ts-expect-error its too difficult to figure out these types, but this works + //@ts-expect-error it's too difficult to figure out these types, but this works chart.data.datasets[0].borderColor = (ctx): string => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access const isPb = ctx.raw?.isPb as boolean; diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 5a8d449e8..8a680b8a0 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -930,6 +930,7 @@ export async function finish(difficultyFailed = false): Promise { if (!TestState.isActive) return; TestUI.setResultCalculating(true); const now = performance.now(); + TestTimer.clear(); TestStats.setEnd(now); // fade out the test and show loading @@ -977,7 +978,6 @@ export async function finish(difficultyFailed = false): Promise { LiveBurst.hide(); TimerProgress.hide(); OutOfFocus.hide(); - TestTimer.clear(); Monkey.hide(); void ModesNotice.update();