mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #411] [MERGED] fix: handle single object for openGraph.images and twitter.images #551
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#551
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/411
Author: @jokull
Created: 3/10/2026
Status: ✅ Merged
Merged: 3/10/2026
Merged by: @james-elicx
Base:
main← Head:fix/metadata-og-images-single-object📝 Commits (3)
1e3383afix: handle single object for openGraph.images and twitter.images in metadata shim805cd04Merge remote-tracking branch 'origin/main' into fix/metadata-og-images-single-objecte000fa6fmt📊 Changes
3 files changed (+68 additions, -5 deletions)
View changed files
📝
packages/vinext/src/shims/metadata.tsx(+17 -5)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-opengraph-single-image/page.tsx(+27 -0)📝
tests/nextjs-compat/metadata.test.ts(+24 -0)📄 Description
Summary
openGraph.imagesortwitter.imagesis a single object instead of an arrayimagesto be astring, a single{ url, width, height }object, or an array — the metadata shim only handled string and array, crashing on single objectsMetadatatype definition to include single-object variantsReproduction
Any page using
generateMetadata()orexport const metadatathat returnsopenGraph.imagesas a single object (common when using libraries likereact-datocms'stoNextMetadata()) causes the worker to crash with:Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.