From 1b4a0d76ddc84039b2fd9d4ec828a9a42c4f9d39 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Fri, 17 Jul 2026 15:37:20 +0000 Subject: [PATCH] fix: remove remaining Svelte state warnings --- src/apps/browser/ui/TextInputBox.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/apps/browser/ui/TextInputBox.svelte b/src/apps/browser/ui/TextInputBox.svelte index 96a53415..8066da4b 100644 --- a/src/apps/browser/ui/TextInputBox.svelte +++ b/src/apps/browser/ui/TextInputBox.svelte @@ -9,8 +9,12 @@ }; const { title, message, commit, initialText, placeholder, isPassword }: Props = $props(); - let text = $state(initialText || ""); - let type = $state(isPassword ? "password" : "text"); + function initialTextSeed(): string { + return initialText ?? ""; + } + + let text = $state(initialTextSeed()); + const type = $derived(isPassword ? "password" : "text"); function cancel() { commit(false); }