diff --git a/packages/next/src/lib/metadata/generate/meta.tsx b/packages/next/src/lib/metadata/generate/meta.tsx index 96394bc7b008a..c291e85efbef3 100644 --- a/packages/next/src/lib/metadata/generate/meta.tsx +++ b/packages/next/src/lib/metadata/generate/meta.tsx @@ -100,6 +100,9 @@ export function MultiMeta({ if (typeof contents === 'undefined' || contents === null) { return null } + if (!Array.isArray(contents)) { + contents = [contents] + } return MetaFilter( contents.map((content) => { diff --git a/packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts b/packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts index 780f3c2e45ab0..ac54047993366 100644 --- a/packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts +++ b/packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts @@ -166,6 +166,11 @@ export const resolveOpenGraph: FieldResolverExtraArgs< ) } + /* + warning: force type assertion maybe merge authors of openGraph with string type from Metadata into ResolvedOpenGraph, + but it's not support a string type for authors of openGraph. + is there any other field that has the same issue? + */ const resolved = { ...openGraph, title: resolveTitle(openGraph.title, titleTemplate),