From 947cf6b96718269018578a6d2af0b0cff1550beb Mon Sep 17 00:00:00 2001 From: Rustem Mussabekov Date: Sun, 30 Jun 2024 14:35:01 +0300 Subject: [PATCH] Fix edge case --- src/ui/index.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/index.svelte b/src/ui/index.svelte index 0c26087..de0d0e4 100644 --- a/src/ui/index.svelte +++ b/src/ui/index.svelte @@ -19,6 +19,7 @@ clearTimeout(loadTimeout) loadTimeout = setTimeout(() => apply(store.highlights), 3000) as any as number } + $effect.root(()=>{if (document.readyState) onWindowLoad()}) //unmount $effect(()=>cleanup)