Skip to content

Svelte 5.1.13: Reassigning store leads to undefined #14233

@kyoshino

Description

@kyoshino

Describe the bug

Svelte 5.1.13, probably #14195, introduced a regression in the store API, breaking my Sveltia UI library and Sveltia CMS. I had to downgrade to 5.1.12 to get rid of the error.

After creating a store with writable and reassigning a new store to the variable, the store changes to undefined.

My code

Reproduction

REPL: Svelte 5.1.12 / Svelte 5.1.13

In Svelte 5.1.13, the console says world if you uncomment style = writable('svelte');

An interesting thing is the problem can be reproduced even before the init function is called. You’ll notice that the REPL doesn’t call the function.

Logs

No response

System Info

-

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions