From 419334febed6a704fb6a2bf165ee96d81abe8479 Mon Sep 17 00:00:00 2001 From: exyi Date: Sun, 18 Oct 2020 09:24:16 +0000 Subject: [PATCH] Set digit pattern to Solution captcha --- frontend/src/SolutionCaptcha.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)}>