Skip to content

Commit e82dd7c

Browse files
authored
Merge pull request #3126 from nextcloud/backport/3124/stable5.2
[stable5.2] fix: prevent overwriting previous answers during initialization
2 parents dfcb2ea + 841e99d commit e82dd7c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/views/Submit.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,11 @@ export default {
611611
for (const answer of loadedAnswers) {
612612
const questionId = answer.questionId
613613
const text = answer.text
614-
answers[questionId] = []
614+
615+
// Only initialize once, don't overwrite previous answers
616+
if (!answers[questionId]) {
617+
answers[questionId] = []
618+
}
615619
616620
logger.debug(`questionId: ${questionId}, answerId: ${answer.id}`)
617621
// Clean up answers for questions that do not exist anymore

0 commit comments

Comments
 (0)