Unverified Commit e5200fdb authored by Camille Barneaud's avatar Camille Barneaud Committed by GitHub

Fix missing `await` of `params` when metadata is used with an image file (#71871)

parent c376f391
......@@ -168,11 +168,11 @@ async function nextMetadataImageLoader(
return `\
import { fillMetadataSegment } from 'next/dist/lib/metadata/get-metadata-route'
export default (props) => {
export default async (props) => {
const imageData = ${JSON.stringify(imageData)}
const imageUrl = fillMetadataSegment(${JSON.stringify(
pathnamePrefix
)}, props.params, ${JSON.stringify(pageSegment)})
)}, await props.params, ${JSON.stringify(pageSegment)})
return [{
...imageData,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment