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

Illegal property names aren't quoted for SSR #3312

Closed
Rich-Harris opened this issue Jul 30, 2019 · 0 comments · Fixed by #3314
Closed

Illegal property names aren't quoted for SSR #3312

Rich-Harris opened this issue Jul 30, 2019 · 0 comments · Fixed by #3314
Labels

Comments

@Rich-Harris
Copy link
Member

Describe the bug

A component can have a property like <Foo x-y-z={42}/>, and it will ordinarily be quoted by the compiler:

var foo = new Foo({ props: { "x-y-z": 42 } });

In SSR mode, we get this instead:

return `${validate_component(Foo, 'Foo').$$render($$result, { x-y-z: 42 }, {}, {})}`;

This is somewhat contrived (you can only access that property via $$props['x-y-z']), but it's a situation I've managed to encounter, and it's easily fixed.

To Reproduce

Voila

Severity

I mean... probably not the highest. But like I say, easy fix

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.

1 participant