Skip to content

Commit

Permalink
fix: page metadata generation not working in turbopack (#6417)
Browse files Browse the repository at this point in the history
In turbo, payloadFaviconDark is a string, not an object with src
  • Loading branch information
AlessioGr committed May 17, 2024
1 parent eeb689d commit 147b50e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/src/utilities/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export const meta = async (args: MetaConfig & { serverURL: string }): Promise<an
type: 'image/png',
rel: 'icon',
sizes: '32x32',
url: payloadFaviconDark?.src,
url: typeof payloadFaviconDark === 'object' ? payloadFaviconDark?.src : payloadFaviconDark,
},
{
type: 'image/png',
media: '(prefers-color-scheme: dark)',
rel: 'icon',
sizes: '32x32',
url: payloadFaviconLight?.src,
url: typeof payloadFaviconLight === 'object' ? payloadFaviconLight?.src : payloadFaviconLight,
},
]

Expand Down Expand Up @@ -79,7 +79,7 @@ export const meta = async (args: MetaConfig & { serverURL: string }): Promise<an
{
alt: ogTitle,
height: 480,
url: staticOGImage.src,
url: typeof staticOGImage === 'object' ? staticOGImage?.src : staticOGImage,
width: 640,
},
],
Expand Down

0 comments on commit 147b50e

Please sign in to comment.