diff --git a/server/static/index.html b/server/static/index.html
index a0982d8f4..d5ef94d9e 100644
--- a/server/static/index.html
+++ b/server/static/index.html
@@ -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";
}