From 7272b650d6a043831d99e7c0e881b5b6a65db570 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 12 Jun 2024 11:27:24 +0100 Subject: [PATCH] chore: remoev setTimeout (#12009) --- playgrounds/demo/src/entry-client.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/playgrounds/demo/src/entry-client.ts b/playgrounds/demo/src/entry-client.ts index 6675efdd1..2bde77658 100644 --- a/playgrounds/demo/src/entry-client.ts +++ b/playgrounds/demo/src/entry-client.ts @@ -4,11 +4,9 @@ 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); -}, 2000) +const component = render(App, { + target: document.getElementById('root')! +}); +// @ts-ignore +window.unmount = () => unmount(component);