From 1286754681cf37a5a01a6a2fcef0fa4a99cc65a9 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Tue, 8 Jul 2025 00:59:11 -0400
Subject: Set non-`undefined` initial values for the login form.

The default state of a `$state()` with no arguments is `undefined`, which was then leaking out of this component if the user clicks `sign in` without changing the values. Axiom, our HTTP client library, suppresses fields with `undefined` values in JSON payloads (sensibly enough), leading to empty requests.
---
 ui/lib/components/LogIn.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'ui/lib/components/LogIn.svelte')

diff --git a/ui/lib/components/LogIn.svelte b/ui/lib/components/LogIn.svelte
index c49ea3b..b491583 100644
--- a/ui/lib/components/LogIn.svelte
+++ b/ui/lib/components/LogIn.svelte
@@ -1,8 +1,8 @@
 <script>
   let { legend = 'sign in', logIn = async (username, password) => {} } = $props();
 
-  let username = $state();
-  let password = $state();
+  let username = $state('');
+  let password = $state('');
   let disabled = $state(false);
 
   async function onsubmit(event) {
-- 
cgit v1.2.3

