From 11825d9bf27bef6f1f1198f8bc7449388c78f4d8 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Mon, 10 Jun 2024 15:05:32 +0100 Subject: [PATCH] fix: ensure bound input content is resumed on hydration --- playgrounds/demo/src/entry-client.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/playgrounds/demo/src/entry-client.ts b/playgrounds/demo/src/entry-client.ts index d5b317873c..8ec831e425 100644 --- a/playgrounds/demo/src/entry-client.ts +++ b/playgrounds/demo/src/entry-client.ts @@ -4,11 +4,8 @@ import App from './App.svelte'; const root = document.getElementById('root')!; const render = root.firstChild?.nextSibling ? hydrate : mount; -setTimeout(() => { - const component = render(App, { - target: document.getElementById('root')! - }); - // @ts-ignore - window.unmount = () => unmount(component); -}, 1000) - +const component = render(App, { + target: document.getElementById('root')! +}); +// @ts-ignore +window.unmount = () => unmount(component);