-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Circular structure bug when referencing the $el in a different variable #78
Comments
Solution here is probably to try to detect Alpine variables that are DOM Nodes and display "DOM Node" or "HTMLElement" instead of the actual value, a bit like we do for "function" See the following codepen to detect HTMLElement https://codepen.io/hugodf/pen/OJRJwXJ |
Thanks for taking care of this guys. It almost works except when I wrap my |
@pomartel that's cause it's a jQuery instance 😂 I wonder how we can detect that |
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"? |
I guess we can do The other way to do it is to try to unfurl the jQuery wrapper |
the problem with this is that I think the error happens on I think we can look at this again if we start sending data more piecemeal (eg. send components, send a component's top-level fields, send field values instead of 1 massive message that has everything in it) which we started looking at in #10 |
Referencing the $el in another object attribute will cause a bug when the devtool stringifies the object.
See this page here with the console opened: https://cdpn.io/pomartel/debug/abmbyNg/xJAjOeOZonJk
The Codepen source here: https://codepen.io/pomartel/pen/abmbyNg
The text was updated successfully, but these errors were encountered: