Skip to content

Commit 26a0201

Browse files
authored
fix: reset counter in populateFields so all question field types are initialized (#11)
1 parent 6b7c7f3 commit 26a0201

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/Modals/Question.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ const question = reactive({
150150
151151
const populateFields = () => {
152152
let fields = ['option', 'is_correct', 'explanation', 'possibility']
153-
let counter = 1
154153
fields.forEach((field) => {
154+
let counter = 1
155155
while (counter <= 4) {
156156
question[`${field}_${counter}`] = field === 'is_correct' ? false : null
157157
counter++

0 commit comments

Comments
 (0)