From f8a80d7b71964c5582b3ab502b33466c3cd25de6 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sun, 10 Nov 2024 08:37:37 +0200 Subject: [PATCH] Fixed small issue when not using $state on variables --- src/routes/card/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/card/+page.svelte b/src/routes/card/+page.svelte index 3a71d39..759b79d 100644 --- a/src/routes/card/+page.svelte +++ b/src/routes/card/+page.svelte @@ -5,12 +5,12 @@ let cards: Card[] = $state([]); let error: string | null = $state(null); let editingCard: Card | null = $state(null); - let newCard: Partial = { + let newCard: Partial = $state({ balance: 0, credit_line: 0, have_credit_line: false, name: "", - }; + }); // Fetch all cards on page load onMount(async () => {