]> Untitled Git - lemmy-ui.git/commitdiff
add fallback style tag
authorAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Thu, 22 Jun 2023 14:32:39 +0000 (10:32 -0400)
committerAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Thu, 22 Jun 2023 14:32:39 +0000 (10:32 -0400)
src/server/utils/create-ssr-html.tsx

index ae766b3a0e73294f6e019875ab6056575903a16e..a7a87ac9779c03c3ead10e66de686b5df0a3e0fe 100644 (file)
@@ -8,6 +8,8 @@ import { fetchIconPng } from "./fetch-icon-png";
 
 const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || "";
 
+const fallbackStyleTag = `<link rel="stylesheet" type="text/css" href="/css/themes/darkly.css" />`;
+
 let appleTouchIcon: string | undefined = undefined;
 
 export async function createSsrHtml(
@@ -85,7 +87,7 @@ export async function createSsrHtml(
     <link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
   
     <!-- Current theme and more -->
-    ${helmet.link.toString()}
+    ${helmet.link.toString() || fallbackStyleTag}
     
     </head>