Check number input value against ''.

Fixes #1050.
This commit is contained in:
Harald Brunner 2022-01-30 11:13:24 +01:00
commit da1f38be94

View file

@ -135,7 +135,7 @@
$: dispatch("change", value); $: dispatch("change", value);
$: incrementLabel = translateWithId("increment"); $: incrementLabel = translateWithId("increment");
$: decrementLabel = translateWithId("decrement"); $: decrementLabel = translateWithId("decrement");
$: value = inputValue != null ? Number(inputValue) : null; $: value = inputValue != "" ? Number(inputValue) : null;
$: error = $: error =
invalid || (!allowEmpty && value == null) || value > max || value < min; invalid || (!allowEmpty && value == null) || value > max || value < min;
$: errorId = `error-${id}`; $: errorId = `error-${id}`;