We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bbe4ad commit 032ac69Copy full SHA for 032ac69
docs/js/theme-toggle.js
@@ -22,9 +22,7 @@
22
}
23
const isDark = theme === 'dark';
24
document.documentElement.classList.toggle(CODE_THEME_CLASS, isDark);
25
- if (document.body) {
26
- document.body.classList.toggle(CODE_THEME_CLASS, isDark);
27
- }
+ document.body.classList.toggle(CODE_THEME_CLASS, isDark);
28
29
30
const theme = localStorage.getItem(STORAGE_KEY) || (prefersDarkQuery?.matches ? 'dark' : 'light');
0 commit comments