fix: bad reference
This commit is contained in:
parent
d6358afa13
commit
3bd71a6acc
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@
|
||||||
<script>
|
<script>
|
||||||
(() => {
|
(() => {
|
||||||
const currentTheme = sessionStorage?.getItem('theme');
|
const currentTheme = sessionStorage?.getItem('theme');
|
||||||
if (!currentTheme) sessionStorage?.setItem('theme', (this.prefersDarkScheme ? 'dark' : 'light'))
|
if (!currentTheme) sessionStorage?.setItem('theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
||||||
if (currentTheme === 'dark') {
|
if (currentTheme === 'dark') {
|
||||||
document.body.classList.add('theme__dark')
|
document.body.classList.add('theme__dark')
|
||||||
} else if (currentTheme === 'light') {
|
} else if (currentTheme === 'light') {
|
||||||
|
|
Reference in a new issue