-
- Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
Hello everyone,
Since svelte version 3.41, we cannot compile code containing default values in destruct.
Compilation exits with Cannot read property 'subscribable' of undefined
<script> const myObject = {}; const { foo: { bar } = {} } = myObject; </script>
Svelte 3.40 : works fine
Svelte 3.41 : Error compiling component. Cannot read property 'subscribable' of undefined
This makes us rewrite all these assignements as :
const { bar } = myObject?.foo ?? {};
Did we miss something in the changelog ?
Reproduction
3.40.3 : https://svelte.dev/repl/3fa45ef9bff943d3acdee9ba35fbc577?version=3.40.3
3.41.0 : https://svelte.dev/repl/3fa45ef9bff943d3acdee9ba35fbc577?version=3.41.0
Current: https://svelte.dev/repl/3fa45ef9bff943d3acdee9ba35fbc577?version=latest
Logs
No response
System Info
Repl environment
Severity
annoyance
Mlocik97 and Nico385412