From 06dcb164383c1599f8c7b7fa4e0597951195daab Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 27 Jun 2024 12:55:41 -0700 Subject: [PATCH] Tweak variable naming to reduce confusion. --- .../assets/src/views/PerseusRendererIndex.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue b/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue index 1bed1876e66..fd39ab19559 100644 --- a/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue +++ b/kolibri/plugins/perseus_viewer/assets/src/views/PerseusRendererIndex.vue @@ -542,13 +542,13 @@ // it seems it is possible for us to have a serialized state with keys // that do not correspond to any widgets. We need to sanitize the state // before restoring it. - const sanitizedQuestions = {}; + const sanitizedQuestion = {}; for (const key of widgetIds) { if (answerState.question[key]) { - sanitizedQuestions[key] = answerState.question[key]; + sanitizedQuestion[key] = answerState.question[key]; } } - answerState.question = sanitizedQuestions; + answerState.question = sanitizedQuestion; this.itemRenderer.restoreSerializedState(answerState); widgetIds.forEach(id => { if (sorterWidgetRegex.test(id)) {