From e238666fcecbc1b43a53aac987c3a51a4317f600 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 30 Dec 2023 09:25:02 -0800 Subject: [PATCH] chore(docs): avoid stale persisted values --- docs/src/components/index.svelte | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/src/components/index.svelte b/docs/src/components/index.svelte index e2db714..2d0978b 100644 --- a/docs/src/components/index.svelte +++ b/docs/src/components/index.svelte @@ -9,6 +9,7 @@ Column, Content, Theme, + SelectSkeleton, } from "carbon-components-svelte"; import FocusKey from "svelte-focus-key"; import fuzzy from "fuzzy"; @@ -27,9 +28,7 @@ $: filteredModuleNames = pictogramNames.filter((name) => match(value.trim().replace(/\s+/g, ""), name) ); - $: if (typeof document !== "undefined") { - document.documentElement.setAttribute("theme", theme); - } + $: mounted = typeof document !== "undefined"; $: code = ` @@ -56,18 +55,22 @@
- + {#if mounted} + + {:else} + + {/if}