Closed rtlqwm324 closed 3 days ago
This sounds like a duplicate of #11466. Is it only happening for you in onMount
?
This sounds like a duplicate of #11466. Is it only happening for you in
onMount
?
Not only onMount
, but also afterNavigate
produce the same result. However, if tick
is not called first in onMount
, an error occurs: in Chrome, it’s Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$set')
, and in Firefox, it’s Uncaught (in promise) TypeError: root is undefined
. The difference from issue #11466 is that when the code runs without errors, a history entry is not added in Chrome.
Closing as I was unable to reproduce the issue. Note that pushState
requires 2 arguments, so I added an empty object so that it was pushState("", {});
. Will re-open if another minimal reproduction as a repository is provided.
Describe the bug
I’m encountering an issue where the pushState function doesn’t add a new history entry in Chrome, although it works as expected in Firefox.
Here’s the relevant code snippet:
https://github.com/user-attachments/assets/6e2adccc-a409-4e41-b248-7a91c0284a28
Reproduction
To reproduce the issue, please follow these steps:
Create a New Project: Use create-svelte@6.3.5 to generate a new SvelteKit project with the following command:
npm create svelte@6.3.5 my-sveltekit-project
Configure the Project: During the setup, select the following options:
Add the Code Snippet: Enter the code snippet provided in 'Describe the bug'
Logs
No response
System Info
Severity
annoyance
Additional Information
No response