Skip to content

Setting a store to null does not update auto-subscription references #7555

@scottgonzalez

Description

@scottgonzalez

Describe the bug

When a store is set to null, references to $store.value continue to hold the value from the store prior to being nulled out.

Reproduction

https://svelte.dev/repl/d1c48c88ac854c5d9245b739093538de?version=3.48.0

Logs

No response

System Info

System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 24.75 MB / 32.00 GB
    Shell: 5.0.18 - /usr/local/bin/bash
  Binaries:
    Node: 16.15.0 - ~/.nave/installed/16.15.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.5.5 - ~/.nave/installed/16.15.0/bin/npm
  Browsers:
    Brave Browser: 98.1.35.101
    Chrome: 101.0.4951.64
    Firefox: 94.0.2
    Safari: 14.0.3
  npmPackages:
    svelte: ^3.46.6 => 3.46.6 
    webpack: ^4.44.2 => 4.44.2

Severity

annoyance

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