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

[Svelte 5] No more "Attributes need to be unique" error on duplicate class:name and style:property directives #13095

Closed
adiguba opened this issue Sep 1, 2024 · 0 comments · Fixed by #13097

Comments

@adiguba
Copy link
Contributor

adiguba commented Sep 1, 2024

Describe the bug

I don't know if it's intentional or not, but there is no longer an error message in case of duplicate directives for class:name and style:property.

Ex:

<button
	style:border={border}
	style:border="1px solid red"
>
	button
</button>

On Svelte 4, this code will produce a compile error "Attributes need to be unique".
This is no longer the case with Svelte 5, (runes enabled or not)

Reproduction

Svelte 4 (OK) : https://svelte.dev/repl/09eaa85fa6b842959418bbcc9c0d1cf2?version=4.2.19

Svelte 5, non-runes mode : https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACnVQwWrDMAz9FaFLoQzCrm5c6HfMO6SxOgxObCRlpA3598Y1pbBRdJCe9HhP0oKXEEnQfC04dgOhwVPO-IF6zQXIL0WlDUuauC-dVnoOWY9udEpzTqwQSUHCjQ7Q7GEgH6YBEkPs-Idg3_xhnhN74oMb2-YltUV7nlRTKbWPnYipSnYp0tbaXcW79T3j4VgJotdIpnrZpeb_A4efeQZJMXhg8g4L43Hac5m2qdVx-8GQfLgE8miUJ1q_1ztxzxAlPgEAAA==

Svelte 5, runes mode : https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACnVPywrCMBD8lbAIKgjFa2wEv8N4aJutBNImZLeihv67jUE8iOxhZ2ZnXwl665BAnhOMzYAg4RQC7IAfIRO6oWNcOPkpdlmpqYs28FGPmh2ySBloJvvEnWh9NBizMgslViH6QJvtQY919W1bom4nZp8hd64hkgMaOw0q5TFKqXXh6_m_wzXxisVA_HAoy26VSv4taNiHuyDvrBERjYbseL_xOaauCjou_w7e2N6iAclxwvkyvwAgiWkEKgEAAA==

Logs

No response

System Info

REPL

Severity

annoyance

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

Successfully merging a pull request may close this issue.

1 participant