Skip to content

Strange cleanup bug when using {#each} block #14961

@webJose

Description

@webJose

Describe the bug

I don't know if this relates directly to the use of createSubscriber or not. I have a class that uses this function. The class takes some options that can only be set during construction, so the consumer of the class uses a $derived to construct a new instance every time the desired options change.

The store contains an array. I don't know if other types of data trigger this issue, or not, but array is what I have at work, so the reproduction uses an array.

Just by using an {#each} block to iterate the contents of the store is enough to make the previous store instance to fail cleanup.

Not shown in the repro, but if you manually access each item in the array as opposed of using the {#each} block, the problem doesn't happen and the previous store instance cleans up just fine.

Reproduction

REPL

Logs

No response

System Info

REPL

Severity

blocking an upgrade

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions