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: Astro Island's data is not correctly serialized #3266

Closed
1 task
caioferrarezi opened this issue May 3, 2022 · 1 comment · Fixed by #3275
Closed
1 task

🐛 BUG: Astro Island's data is not correctly serialized #3266

caioferrarezi opened this issue May 3, 2022 · 1 comment · Fixed by #3275
Assignees

Comments

@caioferrarezi
Copy link
Contributor

What version of astro are you using?

1.0.0-beta.21

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Linux

Describe the Bug

The serialization of the component properties (this is the case I've seen) is not generating a valid JSON. In the example I attached here, I'm getting the current html for astro-island component:

image

Which is throwing the following error when trying to hydrate:

image

Link to Minimal Reproducible Example

https://codesandbox.io/s/admiring-bird-mgf1yx?file=/src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
@caioferrarezi
Copy link
Contributor Author

I think the problem is that astro-island script is using JSON.parse here to parse something that was serialized by another lib here

I don't know the codebase so much to write the solution without any side effect, but if someone helps me I could open a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment