Skip to content

Commit 4c816a0

Browse files
committed
use var to fix themes in old browsers
1 parent 22e76ab commit 4c816a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
1010
<base href="{base}" />
1111
<script>
12-
let theme = localStorage.getItem('theme');
12+
var theme = localStorage.getItem('theme');
1313
if (theme === null) {
1414
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
1515
theme = 'theme-dark';
1616
} else {
1717
theme = 'theme-light';
1818
}
1919
}
20-
const html = document.querySelector('html');
20+
var html = document.querySelector('html');
2121
setTheme(theme);
2222
function setTheme(theme) {
2323
localStorage.setItem('theme', theme);

0 commit comments

Comments
 (0)