diff --git a/frontend/src/scripts/test/result.ts b/frontend/src/scripts/test/result.ts index cbf1dc6e1..5dd337c8b 100644 --- a/frontend/src/scripts/test/result.ts +++ b/frontend/src/scripts/test/result.ts @@ -28,10 +28,10 @@ export function toggleUnsmoothedRaw(): void { Notifications.add(useUnsmoothedRaw ? "on" : "off", 1); } -const resultAnnotation = ( +let resultAnnotation = ( ChartController.result.options as PluginChartOptions<"line" | "scatter"> ).plugins.annotation.annotations as AnnotationOptions<"line">[]; -const resultScaleOptions = ( +let resultScaleOptions = ( ChartController.result.options as ScaleChartOptions<"line" | "scatter"> ).scales; @@ -594,6 +594,12 @@ export async function update( randomQuote: MonkeyTypes.Quote, dontSave: boolean ): Promise { + resultScaleOptions = ( + ChartController.result.options as ScaleChartOptions<"line" | "scatter"> + ).scales; + resultAnnotation = ( + ChartController.result.options as PluginChartOptions<"line" | "scatter"> + ).plugins.annotation.annotations as AnnotationOptions<"line">[]; result = res; $("#result #resultWordsHistory").addClass("hidden"); $("#retrySavingResultButton").addClass("hidden");