Skip to content

Commit

Permalink
fix: Guard usage of localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Sep 22, 2020
1 parent c8ff5cf commit ea69d09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
});
}

if (window.localStorage.getItem("theme") === "dark") {
if (window.localStorage && window.localStorage.getItem("theme") === "dark") {
window.document.querySelector("#root").style.background = "#111319";
}
</script>
Expand Down

0 comments on commit ea69d09

Please sign in to comment.