Skip to content

Commit 9079ca4

Browse files
authored
Merge pull request #3124 from nextcloud/fix/3106
fix: prevent overwriting previous answers during initialization
2 parents a5b9280 + f77422a commit 9079ca4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/views/Submit.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,11 @@ export default {
614614
for (const answer of loadedAnswers) {
615615
const questionId = answer.questionId
616616
const text = answer.text
617-
answers[questionId] = []
617+
618+
// Only initialize once, don't overwrite previous answers
619+
if (!answers[questionId]) {
620+
answers[questionId] = []
621+
}
618622
619623
logger.debug(`questionId: ${questionId}, answerId: ${answer.id}`)
620624
// Clean up answers for questions that do not exist anymore

0 commit comments

Comments
 (0)