Skip to content

Commit

Permalink
fixup! Remember input in LocalStorage
Browse files Browse the repository at this point in the history
Signed-off-by: hamza221 <[email protected]>
  • Loading branch information
hamza221 committed May 18, 2023
1 parent 7758c4a commit c6d33a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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())
})
Expand Down Expand Up @@ -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)
},
Expand Down

0 comments on commit c6d33a2

Please sign in to comment.