diff --git a/src/views/Submit.vue b/src/views/Submit.vue index bb2450c53..a6cdccc95 100644 --- a/src/views/Submit.vue +++ b/src/views/Submit.vue @@ -243,9 +243,9 @@ export default { this.formValuesForLocalStorage.forEach(answer => { if (answer) { + const answers = [] switch (answer?.type) { case 'QuestionMultiple': - const answers = [] answer.value.forEach(num => { answers.push(num.toString()) }) @@ -285,7 +285,7 @@ export default { }, addFormFieldToLocalStorage(question) { - this.formValuesForLocalStorage[question.id] = { id: question.id, value: this.answers[question.id], type:answerTypes[question.type].component.name } + this.formValuesForLocalStorage[question.id] = { id: question.id, value: this.answers[question.id], type: answerTypes[question.type].component.name } const parsed = JSON.stringify(this.formValuesForLocalStorage) localStorage.setItem(`${this.shareHash}`, parsed) },