diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index b99ecfc..9c456c7 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -39,12 +39,12 @@ const handleSubmit = async (e: SubmitEvent) => { e.preventDefault(); addItem(newItem); - newItem = ''; }; const addItem = async (name: string) => { if (name !== '' && ws?.readyState === WebSocket.OPEN) { ws?.send(JSON.stringify({ operation: 'add', name })); + newItem = ''; } };