-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't workingp3-edge-caseSvelteKit cannot be used in an uncommon waySvelteKit cannot be used in an uncommon wayrouter
Milestone
Description
Describe the bug
Since @sveltejs/[email protected], goto()'s state parameter stopped working. This line is overwriting the state to {} whenever navigation occurs:
kit/packages/kit/src/runtime/client/router.js
Line 281 in 1a6adc8
| history.replaceState({}, '', info.url); |
This is the commit that introduced the bug: d17f459.
Reproduction
- Open the repro: https://stackblitz.com/edit/sveltekit-xfxpb3
- Click the button "Goto with state".
- It will take you to another route where the History state will be visible.
- You'll see the state will be empty. It should be what was passed to
goto().
Logs
No response
System Info
System:
OS: macOS 12.0.1
CPU: (8) arm64 Apple M1
Memory: 112.81 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
Yarn: 1.22.17 - ~/.asdf/installs/nodejs/16.13.1/.npm/bin/yarn
npm: 8.2.0 - ~/.asdf/installs/nodejs/16.13.1/.npm/bin/npm
Watchman: 2021.11.15.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 97.0.4692.71
Safari: 15.1
npmPackages:
@sveltejs/adapter-auto: 1.0.0-next.9 => 1.0.0-next.9
@sveltejs/kit: 1.0.0-next.208 => 1.0.0-next.208
svelte: 3.44.3 => 3.44.3Severity
blocking all usage of SvelteKit
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp3-edge-caseSvelteKit cannot be used in an uncommon waySvelteKit cannot be used in an uncommon wayrouter