Skip to content

Commit 6e4bba7

Browse files
committed
Set theme to system in localstorage if null
1 parent 1cd1aa8 commit 6e4bba7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

handlers/form.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
<title>ladder</title>
88
<script>
99
const handleThemeChange = () => {
10-
const theme = localStorage.getItem("theme");
10+
let theme = localStorage.getItem("theme");
11+
if (theme === null) {
12+
localStorage.setItem("theme", "system");
13+
theme = "system";
14+
}
1115
if (
1216
theme === "dark" ||
1317
(theme === "system" &&

0 commit comments

Comments
 (0)