summaryrefslogtreecommitdiff
path: root/source/features/more-dropdown-links.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2023-05-10 04:32:07 +0800
committerGravatar GitHub <noreply@github.com> 2023-05-10 04:32:07 +0800
commit747b87a6358c729e54148021d44c94e828603e01 (patch)
treedbe2d54ce393ce66bc9ada86655647ed2a586e00 /source/features/more-dropdown-links.tsx
parent12532fc4c149f5922fffba89ee2624bf3982e975 (diff)
downloadrefined-github-747b87a6358c729e54148021d44c94e828603e01.tar.gz
refined-github-747b87a6358c729e54148021d44c94e828603e01.tar.zst
refined-github-747b87a6358c729e54148021d44c94e828603e01.zip
Reliability fixes for `default-branch-button` (#6629)
Diffstat (limited to 'source/features/more-dropdown-links.tsx')
-rw-r--r--source/features/more-dropdown-links.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/features/more-dropdown-links.tsx b/source/features/more-dropdown-links.tsx
index 62a61e25..cd2451fd 100644
--- a/source/features/more-dropdown-links.tsx
+++ b/source/features/more-dropdown-links.tsx
@@ -7,7 +7,8 @@ import * as pageDetect from 'github-url-detection';
import features from '../feature-manager.js';
import getDefaultBranch from '../github-helpers/get-default-branch.js';
import createDropdownItem from '../github-helpers/create-dropdown-item.js';
-import {buildRepoURL, getCurrentCommittish} from '../github-helpers/index.js';
+import {buildRepoURL} from '../github-helpers/index.js';
+import getCurrentGitRef from '../github-helpers/get-current-git-ref.js';
export async function unhideOverflowDropdown(): Promise<boolean> {
// Wait for the tab bar to be loaded
@@ -23,7 +24,7 @@ export async function unhideOverflowDropdown(): Promise<boolean> {
}
async function init(): Promise<void> {
- const reference = getCurrentCommittish() ?? await getDefaultBranch();
+ const reference = getCurrentGitRef() ?? await getDefaultBranch();
const compareUrl = buildRepoURL('compare', reference);
const commitsUrl = buildRepoURL('commits', reference);
const branchesUrl = buildRepoURL('branches');