Skip to content

$page store not correctly updating #5693

Closed
@mattpilott

Description

@mattpilott

Describe the bug

When watching for url changes the store seems to stop being reactive after a short while.

For example in my repro, i have a link that appends #modal to the url, i then have a modal component using the page store to watch this change and show some html, initially it works as expected but after opening then closing then opening then closing again that last close stops working.

There are no errors

Reproduction

https://github.com/mattpilott/sveltekit-page-store-issue

Logs

No response

System Info

System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 4.57 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.6.0 - /opt/homebrew/bin/node
    npm: 8.15.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Firefox: 102.0.1
    Safari: 16.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.63 
    @sveltejs/kit: next => 1.0.0-next.392 
    svelte: ^3.44.0 => 3.49.0 
    vite: ^3.0.0 => 3.0.2

Severity

serious, but I can work around it

Additional Information

How to repro

  1. Clone repo git clone
  2. Install deps npm i
  3. Run dev server npm run dev
  4. Open browser http://localhost:5173
  5. Click link Open Modal
  6. Click link Close me
  7. Click link Open Modal again
  8. Click link Close me again
  9. Issue will happen modal wont close even though url is updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrouter

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions