-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: respect trailing slash option when navigating from the root page of the basepath #11388
Conversation
🦋 Changeset detectedLatest commit: 7858b48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
It looks like the tests are failing A note that it looks like #11357 fixed the server-side and this is fixing the client side |
Tests are fixed now. Targeting the link by its href was a bad idea when there's the base path variable involved |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I just spent 1.5 hours debugging this and was about to submit my own PR when I saw this - thank you for all your work everyone! |
fixes #11382
The implementation for ensuring the basepath root page always ends with a trailing slash in #10763 is wrong because it was implemented in the
load_node
method, causing thealways
trailing slash option to be set on all nodes the root page uses (such as the root layout node), and affecting pages other than the root page. This PR moves the logic closer to where we normalize the URL based on the trailing slash option so we only evaluate the correct trailing slash option after loading the nodes.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.