We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f1a310 commit dd4dbfbCopy full SHA for dd4dbfb
index.ts
@@ -474,7 +474,7 @@ const getRepoPath = (url: URL | Location = location): string | undefined => {
474
const getRepoURL = (url?: URL | Location): string => {
475
if (!url) {
476
const canonical = document.querySelector<HTMLMetaElement>('[property="og:url"]'); // `rel=canonical` doesn't appear on every page
477
- url = canonical ? new URL(canonical.content) : location;
+ url = canonical ? new URL(canonical.content, location.origin) : location;
478
}
479
480
return url.pathname.slice(1).split('/', 2).join('/');
0 commit comments