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

[BUG] New line in RSC response prevents hydration from working #179

Closed
jplhomer opened this issue Nov 9, 2021 · 0 comments · Fixed by #199
Closed

[BUG] New line in RSC response prevents hydration from working #179

jplhomer opened this issue Nov 9, 2021 · 0 comments · Fixed by #199
Assignees
Labels
bug Something isn't working

Comments

@jplhomer
Copy link
Contributor

jplhomer commented Nov 9, 2021

Describe the bug
Screen Shot 2021-11-09 at 1 03 03 PM

For some reason or another, if RSC returns an empty payload for the modules and instead returns an empty line, JSON.parse apparently fails.

We should add a check for it in our custom logic. RSC official version likely does not have this problem.

To Reproduce
Steps to reproduce the behaviour:

  1. Visit https://stackblitz.com/edit/hydrogen-vazsvx?file=src%2Fpages%2Fcollections%2F[handle].server.jsx
  2. Click on a collections template (or any page navigation)
@jplhomer jplhomer added the bug Something isn't working label Nov 9, 2021
@frandiox frandiox self-assigned this Nov 10, 2021
rafaelstz pushed a commit to rafaelstz/hydrogen that referenced this issue Mar 4, 2023
* add-migration-guide

* Update upgrading-from-v1-to-v2.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants