Merge pull request #87 from Erant-s-r-o/master

multichoise fix
This commit is contained in:
Ota-Prokopec 2023-04-27 19:10:17 +02:00 committed by GitHub
commit 7507adf77c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@
export let myAnswer export let myAnswer
let myAnswers = new Array(checkPoint.CPOptions.length).fill(false) let myAnswers = new Array(checkPoint.CPOptions.length).fill(false)
export let clear = false
$: if (clear) myAnswers = new Array(checkPoint.CPOptions.length).fill(false)
$: myAnswer = checkPoint.CPOptions.filter((item, i) => { $: myAnswer = checkPoint.CPOptions.filter((item, i) => {
if (myAnswers[i] === true) return item if (myAnswers[i] === true) return item
}) })