Skip to content

Illegal property names aren't quoted for SSR #3312

@Rich-Harris

Description

@Rich-Harris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions