Skip to content

Delete operator not being reflected until second time #15791

@johnnysprinkles

Description

@johnnysprinkles

Describe the bug

I have an app with some deep state where I'm mutating the deep state with a delete operator. I understand this should all be reactive due to the delete method trap on Proxy, but I'm not seeing my derived state update right away, I have to call delete a second time to see the UI update. See minimal repro example attached. You have to click the Delete button twice to see anything happen.

Reproduction

https://svelte.dev/playground/cfdfaac67da34188ad9bd2fbfe148885?version=5.27.2

Logs

System Info

bunx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers

  System:
    OS: macOS 15.4
    CPU: (8) arm64 Apple M2
    Memory: 99.22 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.12.0 - /usr/local/bin/node
    npm: 10.9.0 - /usr/local/bin/npm
    bun: 1.2.7 - ~/.bun/bin/bun
  Browsers:
    Chrome: 135.0.7049.85
    Safari: 18.4
  npmPackages:
    svelte: ^5.0.0 => 5.23.1

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions