diff --git a/packages/next/src/lib/metadata/resolve-metadata.test.ts b/packages/next/src/lib/metadata/resolve-metadata.test.ts index ceaee526fb781d..815525d93113a9 100644 --- a/packages/next/src/lib/metadata/resolve-metadata.test.ts +++ b/packages/next/src/lib/metadata/resolve-metadata.test.ts @@ -8,7 +8,7 @@ describe('accumulateMetadata', () => { [() => Promise.resolve({ description: 'child' }), null], ] - const metadata = await accumulateMetadata(metadataItems) + const metadata = await accumulateMetadata(metadataItems, undefined) expect(metadata).toMatchObject({ description: 'child', }) @@ -22,7 +22,7 @@ describe('accumulateMetadata', () => { [{ title: 'layout' }, null], [{ title: 'page' }, null], ] - const metadata = await accumulateMetadata(metadataItems) + const metadata = await accumulateMetadata(metadataItems, undefined) expect(metadata).toMatchObject({ title: { absolute: 'page', template: null }, }) @@ -42,7 +42,7 @@ describe('accumulateMetadata', () => { [null, null], // same level layout [{ title: 'page' }, null], ] - const metadata = await accumulateMetadata(metadataItems) + const metadata = await accumulateMetadata(metadataItems, undefined) expect(metadata).toMatchObject({ title: { absolute: '2nd parent layout page', template: null }, }) diff --git a/packages/next/src/lib/metadata/resolve-metadata.ts b/packages/next/src/lib/metadata/resolve-metadata.ts index 7418684dbdddf1..07d6b906941ab7 100644 --- a/packages/next/src/lib/metadata/resolve-metadata.ts +++ b/packages/next/src/lib/metadata/resolve-metadata.ts @@ -251,7 +251,7 @@ function constructMetadataBase(urlBase: string) { export async function accumulateMetadata( metadataItems: MetadataItems, - urlBase: string + urlBase: string | undefined ): Promise { const resolvedMetadata = createDefaultMetadata()