Fix: only preconnect nitro URL if absolute (prevents crash on relative URLs like /nitro-client/)
This commit is contained in:
1 parent
0ac3e4353a
commit
c68fccceeb
1 file changed
+1
-1
+1
-1
@@ -70,7 +70,7 @@ export default async function RootLayout({ children }: { children: ReactNode })
|
||||
<script src="/scripts/theme-init.js" />
|
||||
<link rel="preconnect" href="https://www.habbo.com" />
|
||||
<link rel="dns-prefetch" href="https://www.habbo.com" />
|
||||
{nitroUrl ? (
|
||||
{nitroUrl && nitroUrl.startsWith("http") ? (
|
||||
<link rel="preconnect" href={new URL(nitroUrl).origin} />
|
||||
) : null}
|
||||
</head>
|
||||
|
||||
Reference in new issue
Block a user