diff --git a/src/components/SEO/SEO.svelte b/src/components/SEO/SEO.svelte index b33c403c..da6f994f 100644 --- a/src/components/SEO/SEO.svelte +++ b/src/components/SEO/SEO.svelte @@ -80,6 +80,9 @@ try { return new URL(baseUrl).origin; } catch { + // This handles a weird case where Vite's base path is + // reset to './' after the app hydrates... + if (typeof window !== 'undefined') return getOrigin(window.location.href); return ''; } };