mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
Add hack comment
This commit is contained in:
parent
4b7a8c23be
commit
db860a819e
1 changed files with 5 additions and 1 deletions
|
@ -81,7 +81,11 @@ function Link(
|
||||||
? maybeAddBaseUrl(targetLinkWithoutPathnameProtocol)
|
? maybeAddBaseUrl(targetLinkWithoutPathnameProtocol)
|
||||||
: undefined;
|
: 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('./')) {
|
if (router === 'hash' && targetLink?.startsWith('./')) {
|
||||||
targetLink = targetLink?.slice(1);
|
targetLink = targetLink?.slice(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue