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

Handle unserializable component state generically #101

Closed
HugoDF opened this issue Dec 3, 2020 · 3 comments · Fixed by #102
Closed

Handle unserializable component state generically #101

HugoDF opened this issue Dec 3, 2020 · 3 comments · Fixed by #102
Labels
bug Something isn't working
Milestone

Comments

@HugoDF
Copy link
Collaborator

HugoDF commented Dec 3, 2020

"Circular structure" error when dealing with jQuery

Thanks for taking care of this guys. It almost works except when I wrap my $el in a jquery object like this $($el). Sorry if I'm doing funny things with my Alpine setup! 😆

https://codepen.io/pomartel/pen/abmbyNg

I wonder if it's going to be possible to manage all the weird situations like this one. Maybe just wrap it in a try catch and display it as an "Unknown Element"?

Originally posted by @pomartel in #78 (comment)

We can add a check that each field's value is serializable and label it as unserializable if not.

I'll create an "enhancement" piece to add some UI that points the user to create an issue/discussion on the devtools repo when they see that so that we can decide if it's something we want to handle, eg. we might want to unfurl jQuery but not worry about a ton of other generic bugs #103

@pomartel
Copy link

pomartel commented Dec 3, 2020

Thanks Hugo! That looks good to me. I will test it out once 0.0.9 gets released.

@HugoDF
Copy link
Collaborator Author

HugoDF commented Dec 3, 2020

Thanks Hugo! That looks good to me. I will test it out once 0.0.9 gets released.

0.0.9 is live for Firefox, pending review for Chrome 👍

Thanks for suggesting to handle these types of issues in a generic fashion.

@pomartel
Copy link

pomartel commented Dec 3, 2020

Works great now. Thanks a lot for the quick fix!

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