You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid using history.pushState(...) and history.replaceState(...)as these will conflict with SvelteKit's router. Use the pushState and replaceState imports from $app/navigation instead.
The text was updated successfully, but these errors were encountered:
eltigerchino
changed the title
replaceState in onMount blocks the $page store update
replaceState in onMount does not update the $page store
Mar 22, 2024
Describe the bug
When the
replaceState
is used to trim the URL search params,The
$page
store accessed by the top+layout.svelte
is not updated.Reproduction
Open the StackBlitz reproduction and click the hyperlinks in-order.
When navigating from
/
to/cookie?query
for the first time.When navigating from
/
to/cookie?query
for the second time. (expected behavior)Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
Workaround using the
history.replaceState
API shows error in the console.The text was updated successfully, but these errors were encountered: