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

Shorthand property in event handler fails #296

Closed
Rich-Harris opened this issue Feb 24, 2017 · 0 comments
Closed

Shorthand property in event handler fails #296

Rich-Harris opened this issue Feb 24, 2017 · 0 comments
Labels

Comments

@Rich-Harris
Copy link
Member

Demo. Code like this...

<button on:click='fire("foo", { foo })'>click me</button>

...gets transpiled to code like this:

function clickHandler ( event ) {
  var root = this.__svelte.root;
		
  component.fire("foo", { root.root.foo });
}
@Rich-Harris Rich-Harris changed the title Destructuring in event handler fails Shorthand property in event handler fails Feb 28, 2017
Rich-Harris added a commit that referenced this issue Feb 28, 2017
handle shorthand properties in expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant