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 if default object is instantiated with global value #108

Open
def-roth opened this issue Nov 20, 2023 · 0 comments
Open

Bug if default object is instantiated with global value #108

def-roth opened this issue Nov 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@def-roth
Copy link
Contributor

Occurs if objects are set as defaults for props after closing and reopening the code editor. Then a comma is inserted wrong.

val isModalOpen:any = false;

// good
component Header(
 default={"open": isModalOpen }
) => (...)
val isModalOpen:any = false;

// bad
component Header(
 default:any={,
 "open": isModalOpen,
 }
) => (...)

If the comma gets removed one gets an unexpected error at the beginning of the document. Which is fixed if both commas are rmoved as in the good example.

@prevwong prevwong added the bug Something isn't working label Jan 6, 2024
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

No branches or pull requests

2 participants