Skip to content

Commit

Permalink
fix: hydration mismatch warning (#108)
Browse files Browse the repository at this point in the history
Co-authored-by: Hunter Johnston <[email protected]>
  • Loading branch information
jdgamble555 and huntabyte authored Jan 24, 2025
1 parent 5021963 commit fd14254
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/moody-moles-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mode-watcher": patch
---

silence hydration mismatch warning
3 changes: 2 additions & 1 deletion packages/mode-watcher/src/lib/mode-watcher-full.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
/* eslint-disable svelte/no-unused-svelte-ignore */
import { setInitialMode } from "./mode.js";
import type { ThemeColors } from "./types.js";
Expand All @@ -14,7 +15,7 @@
<!-- but that snippet does not run in vitest -->
<meta name="theme-color" content={themeColors.dark} />
{/if}
<!-- eslint-disable-next-line svelte/no-at-html-tags, prefer-template -->
<!-- eslint-disable-next-line svelte/no-at-html-tags, prefer-template --><!-- svelte-ignore hydration_html_changed -->
{@html `<script${trueNonce ? ` nonce=${trueNonce}` : ""}>(` +
setInitialMode.toString() +
`)(` +
Expand Down

0 comments on commit fd14254

Please sign in to comment.