Closed
Description
I've run into this a couple times where I want to conditionally add a class name, but svelte raises a ParseError when I try to use an if block inside class
.
Here's a broken example: https://svelte.technology/repl?version=1.53.0&gist=287434fece22488b8af3aba0edb73988
Using a ternary works: https://svelte.technology/repl?version=1.53.0&gist=67ccedb4c7cc8e661bc61bb75c40e50c
This may be simply a documentation issue. Using a ternary is fine, but I forget and run into that same error every time.
Metadata
Metadata
Assignees
Labels
No labels