diff --git a/frontend/src/SolutionCaptcha.svelte b/frontend/src/SolutionCaptcha.svelte index 12ae47d..0f1f0a1 100644 --- a/frontend/src/SolutionCaptcha.svelte +++ b/frontend/src/SolutionCaptcha.svelte @@ -4,11 +4,9 @@ const a = Math.floor(Math.random() * 80) + 20 const b = Math.floor(Math.random() * 80) + 20 - let ok = true const eventDispatcher = createEventDispatcher() function newValue(val: number) { - ok = a + b == val - if (ok) { + if (a + b == val) { eventDispatcher("done") } } @@ -16,5 +14,5 @@

Úlohu zatím nemáš vyřešenou, opravdu si chceš vyzradit řešení?

- {a} + {b} = newValue(+e.currentTarget.value)}> + {a} + {b} = newValue(+e.currentTarget.value)}>