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

{#each x as x} with bind: mutates x #1565

Closed
aphitiel opened this issue Jun 27, 2018 · 1 comment · Fixed by #3698
Closed

{#each x as x} with bind: mutates x #1565

aphitiel opened this issue Jun 27, 2018 · 1 comment · Fixed by #3698
Labels

Comments

@aphitiel
Copy link
Contributor

Using {#each x as x} is not only stupid, it's also dangerous, as this REPL shows.

If you type into any input, data.x changes from array to an element of itself. I think the compiler could either guard against this or leave my data alone and just let me write the occasional dumb code.

@Rich-Harris
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants