useRouter with hash #2059
Unanswered
FrontLeejonghun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When localePrefix is set to as-needed and routing is done with a hash attached, the hash disappears when the default locale is used.
However, when localePrefix is set to always, it works as expected.
Is there something I might be missing here?
I'm using version 4.3.9.
The reproduction steps are as follows:
When accessing with the defaultLocale, if you perform a router push or handle routing with the locale attached, the hash disappears.
However, if you explicitly remove the locale parameter from useRouter or Link, it works correctly.
There’s a chance the problem is coming from this section of the code (router-server.ts, lines 205–215). It might be good to double-check that part.
/).ko).#hash=test) disappears.Beta Was this translation helpful? Give feedback.
All reactions