mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-08 07:56:12 +02:00
fix: undefined document in ssr
This commit is contained in:
committed by
Jean-Philippe Sirois
parent
b6b295fced
commit
c81d9246c4
@@ -14,6 +14,8 @@ const ThemeScript = () => {
|
||||
else return "dark"
|
||||
}
|
||||
|
||||
if (typeof document === "undefined") return;
|
||||
|
||||
document.documentElement.style.setProperty(
|
||||
"--initial-theme",
|
||||
getInitialTheme()
|
||||
|
||||
Reference in New Issue
Block a user