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

Compiler error "Cannot read property 'name' of null" with two-way-binding + brackets #602

Closed
TehShrike opened this issue May 28, 2017 · 1 comment

Comments

@TehShrike
Copy link
Member

Svelte version 1.20.2

Template snippet:

<input type='checkbox' bind:checked='todo["done"]'>

Expected behavior: should compile as happily as if I had used bind:checked='todo.done'

Observed behavior: compiler errors out with Cannot read property 'name' of null

Reproduction: https://svelte.technology/repl?version=1.20.2&gist=6bc409d8cf45766230d012b355ebcf7c

TehShrike added a commit to TehShrike/way-over-the-top that referenced this issue May 28, 2017
- in ChannelList, moved the provider data from the template to a data structure
- made a Checkbox component because of this bug: sveltejs/svelte#602
- changed provider-channels to export an array instead of an object with a single array property
- added svelte as an explicit dependency for version pinning
@TehShrike
Copy link
Member Author

TehShrike commented May 28, 2017

haha, I was about to comment here noting that Rich confirmed this wasn't a bug, and here's a recent commit from Rich purporting to add the ability to bind to computed properties. Kickass.

Rich-Harris added a commit that referenced this issue Jun 1, 2017
support binding to computed member expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant