Skip to content

Commit 48db994

Browse files
committed
fix(theme): read theme from document.body
1 parent 7d4828f commit 48db994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/theme/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const getThemeId = (): string => {
22
if (typeof document === 'undefined') return 'light'
3-
return document.documentElement.getAttribute('data-theme') || 'light'
3+
return document.body.getAttribute('data-theme') || 'light'
44
}

0 commit comments

Comments
 (0)