Merged in fix/branch-deploy-metadata (pull request #1522)

fix: fallback to undefined when no PUBLIC_URL

* fix: fallback to undefined when no PUBLIC_URL


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-03-12 13:58:29 +00:00
committed by Linus Flood
parent 1ef6fd02c1
commit b472854243

View File

@@ -108,7 +108,7 @@ export const metadataSchema = rawMetadataSchema.transform(async (data) => {
const noIndex = !!data.web?.seo_metadata?.noindex
const metadata: Metadata = {
metadataBase: new URL(env.PUBLIC_URL),
metadataBase: env.PUBLIC_URL ? new URL(env.PUBLIC_URL) : undefined,
title: await getTitle(data),
description: getDescription(data),
openGraph: {