History feature & Duplicate goto page navigations #35
-
I am struggling to understand this section of code. I was tracking down why my page was being navigated to twice whenever a param changed. sveltekit-search-params/src/lib/sveltekit-search-params.ts Lines 195 to 203 in cff3b8c If I disable history, this fixes the issue. If I change it to an if else, this fixes the issue as well. Does the history feature require visiting the page twice like this? Note this is particular code block is duplicated twice for queryParameters and queryParams. And thanks for the project, appreciate how simple it made dealing with everything as a svelte newbie. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's actually not visiting the page twice...the first time is setting the query param without adding an history entry, the second one is just pushing again to the current url to add an history entry |
Beta Was this translation helpful? Give feedback.
It's actually not visiting the page twice...the first time is setting the query param without adding an history entry, the second one is just pushing again to the current url to add an history entry