Skip to content

Commit

Permalink
Add hack comment
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed May 17, 2024
1 parent 4b7a8c2 commit db860a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/docusaurus/src/client/exports/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ function Link(
? maybeAddBaseUrl(targetLinkWithoutPathnameProtocol)
: undefined;

// TODO temporary hack
// TODO find a way to solve this problem properly
// Fix edge case when useBaseUrl is used on a link
// "./" is useful for images and other resources
// But we don't need it for <Link>
// unfortunately we can't really make the difference :/
if (router === 'hash' && targetLink?.startsWith('./')) {
targetLink = targetLink?.slice(1);
}
Expand Down

0 comments on commit db860a8

Please sign in to comment.