Skip to content

Commit 0a80692

Browse files
authored
fix(docs): prevent trailing slash removal from links to root (#4365)
1 parent d36e716 commit 0a80692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/src/components/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const Link = ({
6969
to,
7070
};
7171

72-
if (gatsbyLinkProps.to.endsWith('/')) {
72+
if (gatsbyLinkProps.to.endsWith('/') && gatsbyLinkProps.to.length > 1) {
7373
gatsbyLinkProps.to = gatsbyLinkProps.to.slice(0, -1);
7474
}
7575

0 commit comments

Comments
 (0)