Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #68259 set authors in openGraph of metadata to empty string will be crash with SSR #68151

Closed
wants to merge 1 commit into from

Conversation

tuberrabbit
Copy link

@tuberrabbit tuberrabbit commented Jul 25, 2024

Fixing a bug #68259

According to the official Next.js documentation, developers can set the authors field in the openGraph metadata, and the type accepts either a string or a URL. However, when I attempted to do this, server-side rendering would crash with the error “r.map is not a function” because the actual code execution forcefully asserts that this authors field is of type string[]. This pull request fixes this issue and provides a warning comment.

Feel free to let me know if you need any adjustments!

@ijjk
Copy link
Member

ijjk commented Jul 25, 2024

Allow CI Workflow Run

  • approve CI run for commit: 6ffb6ba

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link

@darknessomi darknessomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devjiwonchoi
Copy link
Member

@tuberrabbit Hi, could you first open an issue with a reproduction? Thank you!

@tuberrabbit tuberrabbit changed the title fix: set authors in openGraph of metadata to string or URL will be crash with SSR fix: set authors in openGraph of metadata to empty string will be crash with SSR Jul 29, 2024
@tuberrabbit tuberrabbit changed the title fix: set authors in openGraph of metadata to empty string will be crash with SSR fix: #68258 set authors in openGraph of metadata to empty string will be crash with SSR Jul 29, 2024
@tuberrabbit tuberrabbit changed the title fix: #68258 set authors in openGraph of metadata to empty string will be crash with SSR fix: #68259 set authors in openGraph of metadata to empty string will be crash with SSR Jul 29, 2024
@tuberrabbit
Copy link
Author

@tuberrabbit Hi, could you first open an issue with a reproduction? Thank you!

Hi, I've updated now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants