Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Feb 20, 2023
1 parent 579e853 commit ab93407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/next/src/lib/metadata/resolve-metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
Expand All @@ -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 },
})
Expand All @@ -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 },
})
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/lib/metadata/resolve-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function constructMetadataBase(urlBase: string) {

export async function accumulateMetadata(
metadataItems: MetadataItems,
urlBase: string
urlBase: string | undefined
): Promise<ResolvedMetadata> {
const resolvedMetadata = createDefaultMetadata()

Expand Down

0 comments on commit ab93407

Please sign in to comment.