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 fc0f933 commit ce4fcc4Copy full SHA for ce4fcc4
index.js
@@ -84,7 +84,7 @@ function shortenRepoUrl(href, currentUrl = 'https://github.com') {
84
* Parse URL manually to avoid URL encoding and punycode
85
*/
86
const origin = href.split('/', 3).join('/');
87
- const pathname = href.slice(origin.length).replace(/[?#].*/, '');
+ const pathname = href.slice(origin.length).replace(/[?#].*/, '') || '/';
88
const hash = /#.+$/.exec(href)?.[0] ?? '';
89
90
// Use URL exclusively for search parameters because they're too hard to parse
0 commit comments