summaryrefslogtreecommitdiff
path: root/source/features/link-to-file-in-file-history.tsx
diff options
context:
space:
mode:
authorGravatar Connor Love <connor@dotconnor.com> 2019-05-12 06:30:42 -0400
committerGravatar Federico Brigante <github@bfred.it> 2019-05-12 18:30:42 +0800
commit078f47d5885e04edbec57b320b21fc818cfe69f1 (patch)
tree3399f0957ee28a0ad0700cfdb0130b57bf2c046a /source/features/link-to-file-in-file-history.tsx
parent3cfdb31c80dce46ba592e0a520ae0e3ac25f69d9 (diff)
downloadrefined-github-078f47d5885e04edbec57b320b21fc818cfe69f1.tar.gz
refined-github-078f47d5885e04edbec57b320b21fc818cfe69f1.tar.zst
refined-github-078f47d5885e04edbec57b320b21fc818cfe69f1.zip
Hide `link-to-file-in-file-history` where not needed (#2025)19.5.12.1917
Co-authored-by: Federico Brigante <github@bfred.it>
Diffstat (limited to 'source/features/link-to-file-in-file-history.tsx')
-rw-r--r--source/features/link-to-file-in-file-history.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/features/link-to-file-in-file-history.tsx b/source/features/link-to-file-in-file-history.tsx
index ef55a483..998a57cc 100644
--- a/source/features/link-to-file-in-file-history.tsx
+++ b/source/features/link-to-file-in-file-history.tsx
@@ -13,7 +13,7 @@ import {groupSiblings} from '../libs/group-buttons';
function init(): void | false {
// /user/repo/commits/master/readme.md -> 'readme.md'
// /user/repo/commits/master/ -> ''
- const path = getRepoPath()!.replace(/^commits\/[^/]+\//, '');
+ const path = getRepoPath()!.replace(/^commits\/[^/]+\/?/, '');
if (!path) {
return false;
}