Skip to content

Bound constants are null in onDestroy #13873

@sockmaster27

Description

@sockmaster27

Describe the bug

When a parent does bind:x on a child's export const x and attempts to use this value in the onDestroy callback, the value of x is null.
This is a breaking change while using Svelte 4 syntax, since x would previously keep the same value.

Reproduction

https://svelte.dev/playground/e7886cdc76d14523bec2b84ea5ace46f?version=5.1.0

Logs

No response

System Info

Not relevant

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions