Skip to content
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: urljoin on basepath #1207

Merged
merged 2 commits into from
Jul 26, 2024
Merged

fix: urljoin on basepath #1207

merged 2 commits into from
Jul 26, 2024

Conversation

abvthecity
Copy link
Contributor

Fixes FER-2475

Short description of the changes made

basepath fallsback to "/" in urljoin

What was the motivation & context behind this PR?

  • urljoin("", "/path") yields "path"
  • urljoin("/", "/path") yields "/path"
  • urljoin("/basepath", "/path") yields "/basepath/path"

useSWR fallback in getDocsPageProps is storing key api/fern-docs/search, meanwhile useSWR is fetching /current/path/to/page/api/fern-docs/search because it's fetching on the relative path.

How has this PR been tested?

This is a noop fix 👍

Copy link

vercel bot commented Jul 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fern-dashboard-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 4:51pm
fern-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 4:51pm
fern-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 4:51pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
fern-dashboard ⬜️ Ignored (Inspect) Jul 26, 2024 4:51pm
fontawesome-cdn ⬜️ Ignored (Inspect) Visit Preview Jul 26, 2024 4:51pm
private-docs ⬜️ Ignored (Inspect) Jul 26, 2024 4:51pm

@abvthecity abvthecity marked this pull request as ready for review July 26, 2024 15:54
@abvthecity abvthecity merged commit 003c538 into main Jul 26, 2024
21 checks passed
@abvthecity abvthecity deleted the ajiang/fix-url-join-on-basepath branch July 26, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants