Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

useLocation() pathname doesn't include the basepath#5423

krishna-santosh started this conversation inGeneral
Discussion options

Don't know if this is an expected behavior or not, but I've noticed that when basepath is configured previously useLocation() pathname used to include the basepath, now it doesn't

When we set basepath to be/app

constlocation=useLocation()location.pathname==='/app/'// (used to be true)// but now location.pathname doesn't include the basepath, solocation.pathname==='/app/'// (this is false) because location.pathname is /
You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

It seems like this might be the intended behavior.

basepath follows the logic of the newly addedrewrite, and in that code, there’s an intentional operation that removes thebasepath.
Please check it outhere.

You must be logged in to vote
1 reply
@krishna-santosh
Comment options

Yeah that makes sense! Thanks for clarifying 👍🏼

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@krishna-santosh@leesb971204

[8]ページ先頭

©2009-2025 Movatter.jp