SEO default location for origin

This commit is contained in:
Jon McClure 2022-08-26 17:37:50 +01:00
parent 2657a77a56
commit a34edbbe3e

View file

@ -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 '';
}
};