You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered a bug that seems similar to this one.
Description
When destructuring a prop via $props() without supplying a default value, event handlers that reference that prop throw a ReferenceError at runtime—even though the console log immediately before shows the correct value. This behavior is non-intuitive and prevents the normal use of destructured props in runes mode.
Describe the bug
The generated code in dev mode references an undefined variable, maybe it thinks every variable in the expression has been declared with
$.prop
?Reproduction
https://svelte.dev/playground/8e7f81107bbd4530a08a77ebe520a10b?version=5.28.2
Look at the JS output, compiler options must be:
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: