Open
Description
The demo of the shorthand of class binding has "Error compiling component".
Link:
https://svelte.technology/repl?version=2.14.2&demo=bz2ba6
Error:
Computed property name 'is-selected' is invalid — must be a valid identifier such as is_selected
12: // Because shorthand relfects the var name, you must use component.set({ "is-selected": true }) or use a computed
13: // property like this. It might be better to avoid shorthand for class names which are not valid variable names.
14: "is-selected": ({ isSelected }) => isSelected
^
15: }
16: }