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

Cannot read property 'subscribable' of undefined #6699

Closed
mlefebvre-decathlon opened this issue Sep 2, 2021 · 2 comments · Fixed by #6715
Closed

Cannot read property 'subscribable' of undefined #6699

mlefebvre-decathlon opened this issue Sep 2, 2021 · 2 comments · Fixed by #6715
Labels
bug compiler Changes relating to the compiler

Comments

@mlefebvre-decathlon
Copy link

mlefebvre-decathlon commented Sep 2, 2021

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

@Conduitry Conduitry added bug compiler Changes relating to the compiler labels Sep 2, 2021
@dummdidumm
Copy link
Member

Probably related to a change in either #6578 or #6574

@Conduitry
Copy link
Member

This should be fixed in 3.42.5 - https://svelte.dev/repl/3fa45ef9bff943d3acdee9ba35fbc577?version=3.42.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compiler Changes relating to the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants