diff --git a/lib/content/generateBrowser.ts b/lib/content/generateBrowser.ts
index 3d1207c..9f4d62e 100644
--- a/lib/content/generateBrowser.ts
+++ b/lib/content/generateBrowser.ts
@@ -10,7 +10,7 @@ const projectServerErrorHtml = `
Sorry! A server error ha
const ad = asciidoctor();
-const isDev = window?.location?.host.startsWith("dev") || false;
+const isDev = typeof window !== "undefined" ? window.location.host.startsWith("dev") : false;
export async function generateContent(content: Project|Diary, selectedPage?: number): Promise {
if(!content) return projectEmpty;