Skip to content

Svelte 5: bind:group incorrectly considers other groups when changing value #9947

@ciscoheat

Description

@ciscoheat

Describe the bug

When using bind:group on a store with nested data, previous groups are taken into account, returning an incorrect value when updating the store. This worked fine in Svelte 4.

I tracked the error to the functions bind_group and get_binding_group_value in render.js, where it seems like all groups are concatenated into one, which will be used in the latter function.

Reproduction

Svelte 5 preview site

  1. Uncheck "Mint choc chip" checkbox
  2. Current flavours will change to "1" (expected an empty array)
  3. Check it again, Mint choc chip will be added after the 1

Logs

No response

System Info

Svelte 5 preview site.

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