From b130482e21e018b886dc410b23e0ca9dc6cfb23e Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Wed, 11 Sep 2019 16:59:02 +0200 Subject: [PATCH] Fixing wrong check --- src/views/questions/SelectMultiple.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/questions/SelectMultiple.svelte b/src/views/questions/SelectMultiple.svelte index 132892c..0ce04e4 100644 --- a/src/views/questions/SelectMultiple.svelte +++ b/src/views/questions/SelectMultiple.svelte @@ -7,7 +7,7 @@ $: options = Object.keys(question.options).map(e => ({ key: e, value: question.options[e] })); let selected = []; - $: isCorrect = selected.length === question.correct.length && selected.every(val => question.correct.find(val)); + $: isCorrect = selected.length === question.correct.length && selected.every(val => question.correct.find(v => v === val)); $: console.log("Selected:", selected, "showResult:", showResult, "isCorrect", isCorrect);