Solving a Listening bug

This commit is contained in:
Tiago Ribeiro
2023-09-25 10:46:04 +01:00
parent 6dda49a917
commit 8b51e50f15
2 changed files with 4 additions and 4 deletions

View File

@@ -62,8 +62,8 @@ export default function WriteBlanks({id, prompt, type, maxWords, solutions, user
(x) =>
solutions
.find((y) => x.id.toString() === y.id.toString())
?.solution.map((y) => y.toLowerCase())
.includes(x.solution.toLowerCase()) || false,
?.solution.map((y) => y.toLowerCase().trim())
.includes(x.solution.toLowerCase().trim()) || false,
).length;
const missing = total - answers.filter((x) => solutions.find((y) => x.id === y.id)).length;